\input{preamble}

% OK, start here.
%
\begin{document}

\title{Derived Categories of Spaces}


\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents

\section{Introduction}
\label{section-introduction}

\noindent
In this chapter we discuss derived categories of modules on algebraic spaces.
There do not seem to be good introductory references addressing this topic;
it is covered in the literature by referring to papers dealing with derived
categories of modules on algebraic stacks, for example see
\cite{olsson_sheaves}.



\section{Conventions}
\label{section-conventions}

\noindent
If $\mathcal{A}$ is an abelian category and $M$ is an object
of $\mathcal{A}$ then we also denote $M$ the object of $K(\mathcal{A})$
and/or $D(\mathcal{A})$ corresponding to the complex which has
$M$ in degree $0$ and is zero in all other degrees.

\medskip\noindent
If we have a ring $A$, then $K(A)$ denotes the homotopy category
of complexes of $A$-modules and $D(A)$ the associated derived category.
Similarly, if we have a ringed space $(X, \mathcal{O}_X)$ the symbol
$K(\mathcal{O}_X)$ denotes the homotopy category of complexes of
$\mathcal{O}_X$-modules and $D(\mathcal{O}_X)$ the associated derived
category.





\section{Generalities}
\label{section-generalities}

\noindent
In this section we put some general results on cohomology of unbounded
complexes of modules on algebraic spaces.

\begin{lemma}
\label{lemma-restrict-direct-image-open}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Given an \'etale morphism $V \to Y$, set $U = V \times_Y X$
and denote $g : U \to V$ the projection morphism. Then
$(Rf_*E)|_V = Rg_*(E|_U)$ for $E$ in $D(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
Represent $E$ by a K-injective complex $\mathcal{I}^\bullet$ of
$\mathcal{O}_X$-modules. Then $Rf_*(E) = f_*\mathcal{I}^\bullet$
and $Rg_*(E|_U) = g_*(\mathcal{I}^\bullet|_U)$ by
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-restrict-K-injective-to-open}.
Hence the result follows from
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-pushforward-etale-base-change-modules}.
\end{proof}

\begin{definition}
\label{definition-supported-on}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $E$ be an object of $D(\mathcal{O}_X)$.
Let $T \subset |X|$ be a closed subset.
We say $E$ is {\it supported on $T$} if the
cohomology sheaves $H^i(E)$ are supported on $T$.
\end{definition}








\section{Derived category of quasi-coherent modules on the small \'etale site}
\label{section-derived-quasi-coherent-etale}

\noindent
Let $X$ be a scheme. In this section we show that
$D_\QCoh(\mathcal{O}_X)$
can be defined in terms of the small \'etale site $X_\etale$ of $X$.
Denote $\mathcal{O}_\etale$ the structure sheaf on
$X_\etale$. 
Consider the morphism of ringed sites
\begin{equation}
\label{equation-epsilon}
\epsilon :
(X_\etale, \mathcal{O}_\etale)
\longrightarrow
(X_{Zar}, \mathcal{O}_X).
\end{equation}
denoted $\text{id}_{small, \etale, Zar}$ in
Descent, Lemma \ref{descent-lemma-compare-sites}.

\begin{lemma}
\label{lemma-epsilon-flat}
The morphism $\epsilon$ of (\ref{equation-epsilon})
is a flat morphism of ringed sites. In particular the functor
$\epsilon^* : \textit{Mod}(\mathcal{O}_X) \to
\textit{Mod}(\mathcal{O}_\etale)$ is exact.
Moreover, if $\epsilon^*\mathcal{F} = 0$, then $\mathcal{F} = 0$.
\end{lemma}

\begin{proof}
The flatness of the morphism $\epsilon$ is
Descent, Lemma \ref{descent-lemma-compare-etale-zariski-flat}.
Here is another proof. We have to show that
$\mathcal{O}_\etale$ is a flat $\epsilon^{-1}\mathcal{O}_X$-module.
To do this it suffices to check
$\mathcal{O}_{X, x} \to \mathcal{O}_{\etale, \overline{x}}$
is flat for any geometric point $\overline{x}$ of $X$, see
Modules on Sites, Lemma
\ref{sites-modules-lemma-check-flat-stalks},
Sites, Lemma
\ref{sites-lemma-point-morphism-sites},
and
\'Etale Cohomology, Remarks
\ref{etale-cohomology-remarks-enough-points}.
By \'Etale Cohomology, Lemma
\ref{etale-cohomology-lemma-describe-etale-local-ring}
we see that $\mathcal{O}_{\etale, \overline{x}}$ is the
strict henselization of $\mathcal{O}_{X, x}$. Thus
$\mathcal{O}_{X, x} \to \mathcal{O}_{\etale, \overline{x}}$
is faithfully flat by More on Algebra,
Lemma \ref{more-algebra-lemma-dumb-properties-henselization}.

\medskip\noindent
The exactness of $\epsilon^*$ follows from the flatness
of $\epsilon$ by
Modules on Sites, Lemma \ref{sites-modules-lemma-flat-pullback-exact}.

\medskip\noindent
Let $\mathcal{F}$ be an $\mathcal{O}_X$-module. If
$\epsilon^*\mathcal{F} = 0$, then with notation as above
$$
0 = \epsilon^*\mathcal{F}_{\overline{x}} =
\mathcal{F}_x \otimes_{\mathcal{O}_{X, x}} \mathcal{O}_{\etale, \overline{x}}
$$
(Modules on Sites, Lemma \ref{sites-modules-lemma-pullback-stalk})
for all geometric points $\overline{x}$. By faithful flatness of
$\mathcal{O}_{X, x} \to \mathcal{O}_{\etale, \overline{x}}$
we conclude $\mathcal{F}_x = 0$ for all $x \in X$.
\end{proof}

\noindent
Let $X$ be a scheme. Notation as in (\ref{equation-epsilon}).
Recall that $\epsilon^* : \QCoh(\mathcal{O}_X)
\to \QCoh(\mathcal{O}_\etale)$
is an equivalence by
Descent, Proposition \ref{descent-proposition-equivalence-quasi-coherent} and
Remark \ref{descent-remark-change-topologies-ringed-sites}.
Moreover, $\QCoh(\mathcal{O}_\etale)$ forms a
Serre subcategory of
$\textit{Mod}(\mathcal{O}_\etale)$ by
Descent, Lemma \ref{descent-lemma-equivalence-quasi-coherent-limits}.
Hence we can let $D_\QCoh(\mathcal{O}_\etale)$ be the triangulated
subcategory of $D(\mathcal{O}_\etale)$ whose objects are the
complexes with quasi-coherent cohomology sheaves, see
Derived Categories, Section \ref{derived-section-triangulated-sub}.
The functor $\epsilon^*$ is exact (Lemma \ref{lemma-epsilon-flat})
hence induces
$\epsilon^* :  D(\mathcal{O}_X) \to D(\mathcal{O}_\etale)$
and since pullbacks of quasi-coherent modules are quasi-coherent
also $\epsilon^* : D_\QCoh(\mathcal{O}_X) \to
D_\QCoh(\mathcal{O}_\etale)$.

\begin{lemma}
\label{lemma-derived-quasi-coherent-small-etale-site}
Let $X$ be a scheme. The functor
$\epsilon^* : D_\QCoh(\mathcal{O}_X) \to
D_\QCoh(\mathcal{O}_\etale)$
defined above is an equivalence.
\end{lemma}

\begin{proof}
We will prove this by showing the functor
$R\epsilon_* : D(\mathcal{O}_\etale) \to D(\mathcal{O}_X)$
induces a quasi-inverse. We will use freely that $\epsilon_*$
is given by restriction to $X_{Zar} \subset X_\etale$ and the description of
$\epsilon^* = \text{id}_{small, \etale, Zar}^*$
in Descent, Lemma \ref{descent-lemma-compare-sites}.

\medskip\noindent
For a quasi-coherent $\mathcal{O}_X$-module $\mathcal{F}$ the adjunction map
$\mathcal{F} \to \epsilon_*\epsilon^*\mathcal{F}$ is an isomorphism by
the fact that $\mathcal{F}^a$
(Descent, Definition \ref{descent-definition-structure-sheaf})
is a sheaf as proved in
Descent, Lemma \ref{descent-lemma-sheaf-condition-holds}.
Conversely, every quasi-coherent $\mathcal{O}_\etale$-module
$\mathcal{H}$ is of the form $\epsilon^*\mathcal{F}$ for some quasi-coherent
$\mathcal{O}_X$-module $\mathcal{F}$, see
Descent, Proposition \ref{descent-proposition-equivalence-quasi-coherent}.
Then $\mathcal{F} = \epsilon_*\mathcal{H}$ by what we just said and
we conclude that the adjunction map
$\epsilon^*\epsilon_*\mathcal{H} \to \mathcal{H}$ is an isomorphism for all
quasi-coherent $\mathcal{O}_\etale$-modules $\mathcal{H}$.

\medskip\noindent
Let $E$ be an object of $D_\QCoh(\mathcal{O}_\etale)$
and denote $\mathcal{H}^q = H^q(E)$ its $q$th cohomology
sheaf. Let $\mathcal{B}$ be the set of affine objects of $X_\etale$.
Then $H^p(U, \mathcal{H}^q) = 0$ for all $p > 0$, all $q \in \mathbf{Z}$,
and all $U \in \mathcal{B}$, see
Descent, Proposition \ref{descent-proposition-same-cohomology-quasi-coherent}
and
Cohomology of Schemes, Lemma
\ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}.
By Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-cohomology-over-U-trivial}
this means that
$$
H^q(U, E) = H^0(U, \mathcal{H}^q)
$$
for all $U \in \mathcal{B}$. In particular, we find that this holds
for affine opens $U \subset X$. It follows that the $q$th cohomology of
$R\epsilon_*E$ over $U$ is the value of the sheaf $\epsilon_*\mathcal{H}^q$
over $U$. Applying sheafification we obtain
$$
H^q(R\epsilon_*E) = \epsilon_*\mathcal{H}^q
$$
which in particular shows that $R\epsilon_*$ induces a functor
$D_\QCoh(\mathcal{O}_\etale) \to D_\QCoh(\mathcal{O}_X)$.
Since $\epsilon^*$ is exact we then obtain
$H^q(\epsilon^*R\epsilon_*E) = \epsilon^*\epsilon_*\mathcal{H}^q =
\mathcal{H}^q$ (by discussion above). Thus the adjunction map
$\epsilon^*R\epsilon_*E \to E$ is an isomorphism.

\medskip\noindent
Conversely, for $F \in D_\QCoh(\mathcal{O}_X)$ the
adjunction map $F \to R\epsilon_*\epsilon^*F$
is an isomorphism for the same reason, i.e., because
the cohomology sheaves of $R\epsilon_*\epsilon^*F$
are isomorphic to
$\epsilon_*H^m(\epsilon^*F) = \epsilon_*\epsilon^*H^m(F) = H^m(F)$.
\end{proof}










\section{Derived category of quasi-coherent modules}
\label{section-derived-quasi-coherent}

\noindent
Let $S$ be a scheme. Lemma
\ref{lemma-derived-quasi-coherent-small-etale-site}
shows that the category $D_\QCoh(\mathcal{O}_S)$ can be defined
in terms of complexes of $\mathcal{O}_S$-modules on the scheme $S$
or by complexes of $\mathcal{O}$-modules on the small \'etale site
of $S$. Hence the following definition is compatible with the definition
in the case of schemes.

\begin{definition}
\label{definition-derived-quasi-coherent}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
The {\it derived category of $\mathcal{O}_X$-modules with
quasi-coherent cohomology sheaves} is denoted
$D_\QCoh(\mathcal{O}_X)$.
\end{definition}

\noindent
This makes sense by
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-properties-quasi-coherent}
and
Derived Categories, Section \ref{derived-section-triangulated-sub}.
Thus we obtain a canonical functor
\begin{equation}
\label{equation-compare}
D(\QCoh(\mathcal{O}_X))
\longrightarrow
D_\QCoh(\mathcal{O}_X)
\end{equation}
see Derived Categories, Equation (\ref{derived-equation-compare}).

\medskip\noindent
Observe that a flat morphism $f : Y \to X$ of algebraic spaces
induces an exact functor
$f^* : \textit{Mod}(\mathcal{O}_X) \to \textit{Mod}(\mathcal{O}_Y)$,
see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-morphism-sites}
and
Modules on Sites, Lemma \ref{sites-modules-lemma-flat-pullback-exact}.
In particular $Lf^* : D(\mathcal{O}_X) \to D(\mathcal{O}_Y)$
is computed on any representative complex
(Derived Categories, Lemma \ref{derived-lemma-right-derived-exact-functor}).
We will write $Lf^* = f^*$ when $f$ is flat and we have
$H^i(f^*E) = f^*H^i(E)$ for $E$ in $D(\mathcal{O}_X)$ in this case.
We will use this often when $f$ is \'etale. Of course in the \'etale
case the pullback functor is just the restriction to $Y_\etale$,
see Properties of Spaces, Equation
(\ref{spaces-properties-equation-restrict-modules}).

\begin{lemma}
\label{lemma-check-quasi-coherence-on-covering}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $E$ be an object of $D(\mathcal{O}_X)$. The following are equivalent
\begin{enumerate}
\item $E$ is in $D_\QCoh(\mathcal{O}_X)$,
\item for every \'etale morphism $\varphi : U \to X$ where $U$ is an
affine scheme $\varphi^*E$ is an object of
$D_\QCoh(\mathcal{O}_U)$,
\item for every \'etale morphism $\varphi : U \to X$ where $U$ is a scheme
$\varphi^*E$ is an object of
$D_\QCoh(\mathcal{O}_U)$,
\item there exists a surjective \'etale morphism $\varphi : U \to X$
where $U$ is a scheme such that $\varphi^*E$ is an object of
$D_\QCoh(\mathcal{O}_U)$, and
\item there exists a surjective \'etale morphism of algebraic spaces
$f : Y \to X$ such that $Lf^*E$ is an object of
$D_\QCoh(\mathcal{O}_Y)$.
\end{enumerate}
\end{lemma}

\begin{proof}
This follows immediately from the discussion preceding the lemma and
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-characterize-quasi-coherent}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-coherence-direct-sums}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Then $D_\QCoh(\mathcal{O}_X)$ has direct sums.
\end{lemma}

\begin{proof}
By Injectives, Lemma \ref{injectives-lemma-derived-products}
the derived category $D(\mathcal{O}_X)$ has direct sums and
they are computed by taking termwise direct sums of any representatives.
Thus it is clear that the cohomology sheaf of a direct sum is the
direct sum of the cohomology sheaves as taking direct sums is
an exact functor (in any Grothendieck abelian category). The lemma
follows as the direct sum of quasi-coherent sheaves is quasi-coherent, see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-properties-quasi-coherent}.
\end{proof}

\noindent
We will need some information on derived limits. We warn the reader
that in the lemma below the derived limit will typically not be
an object of $D_\QCoh$.

\begin{lemma}
\label{lemma-Rlim-quasi-coherent}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $(K_n)$ be an inverse system of
$D_\QCoh(\mathcal{O}_X)$ with derived limit
$K = R\lim K_n$ in $D(\mathcal{O}_X)$. Assume $H^q(K_{n + 1}) \to H^q(K_n)$
is surjective for all $q \in \mathbf{Z}$ and $n \geq 1$.
Then
\begin{enumerate}
\item $H^q(K) = \lim H^q(K_n)$,
\item $R\lim H^q(K_n) = \lim H^q(K_n)$, and
\item for every affine open $U \subset X$ we have
$H^p(U, \lim H^q(K_n)) = 0$ for $p > 0$.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $\mathcal{B} \subset \Ob(X_\etale)$ be the set of affine objects.
Since $H^q(K_n)$ is quasi-coherent we have $H^p(U, H^q(K_n)) = 0$
for $U \in \mathcal{B}$ by the discussion in
Cohomology of Spaces, Section
\ref{spaces-cohomology-section-higher-direct-image}
and
Cohomology of Schemes, Lemma
\ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}.
Moreover, the maps $H^0(U, H^q(K_{n + 1})) \to H^0(U, H^q(K_n))$
are surjective for $U \in \mathcal{B}$ by similar reasoning.
Part (1) follows from Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-derived-limit-suitable-system}
whose conditions we have just verified.
Parts (2) and (3) follow from
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-inverse-limit-is-derived-limit}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-coherence-pullback}
Let $S$ be a scheme.
Let $f : Y \to X$ be a morphism of algebraic spaces over $S$.
The functor $Lf^*$ sends $D_\QCoh(\mathcal{O}_X)$
into $D_\QCoh(\mathcal{O}_Y)$.
\end{lemma}

\begin{proof}
Choose a diagram
$$
\xymatrix{
U \ar[d]_a \ar[r]_h & V \ar[d]^b \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are schemes, the vertical arrows are \'etale, and
$a$ is surjective. Since $a^* \circ Lf^* = Lh^* \circ b^*$ the result
follows from
Lemma \ref{lemma-check-quasi-coherence-on-covering}
and the case of schemes which is
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-quasi-coherence-pullback}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-coherence-tensor-product}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
For objects $K, L$ of $D_\QCoh(\mathcal{O}_X)$
the derived tensor product $K \otimes^\mathbf{L} L$ is in
$D_\QCoh(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
Let $\varphi : U \to X$ be a surjective \'etale morphism from a scheme $U$.
Since
$\varphi^*(K \otimes_{\mathcal{O}_X}^\mathbf{L} L) =
\varphi^*K \otimes_{\mathcal{O}_U}^\mathbf{L} \varphi^*L$
we see from
Lemma \ref{lemma-check-quasi-coherence-on-covering}
that this follows from the case of schemes which is
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-quasi-coherence-tensor-product}.
\end{proof}

\noindent
The following lemma will help us to ``compute'' a right derived functor
on an object of $D_\QCoh(\mathcal{O}_X)$.

\begin{lemma}
\label{lemma-nice-K-injective}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$. Let $E$ be an
object of $D_\QCoh(\mathcal{O}_X)$. Then the canonical map
$E \to R\lim \tau_{\geq -n}E$ is an isomorphism\footnote{In particular,
$E$ has a K-injective representative as in
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-K-injective}.}.
\end{lemma}

\begin{proof}
Denote $\mathcal{H}^i = H^i(E)$ the $i$th cohomology sheaf of $E$.
Let $\mathcal{B}$ be the set of affine objects of $X_\etale$.
Then $H^p(U, \mathcal{H}^i) = 0$ for all $p > 0$, all $i \in \mathbf{Z}$,
and all $U \in \mathcal{B}$ as $U$ is an affine scheme.
See discussion in
Cohomology of Spaces, Section
\ref{spaces-cohomology-section-higher-direct-image}
and
Cohomology of Schemes, Lemma
\ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}.
Thus the lemma follows from
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-is-limit-dimension}
with $d = 0$.
\end{proof}

\begin{lemma}
\label{lemma-application-nice-K-injective}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $F : \textit{Mod}(\mathcal{O}_X) \to \textit{Ab}$
be a functor and $N \geq 0$ an integer. Assume that
\begin{enumerate}
\item $F$ is left exact,
\item $F$ commutes with countable direct products,
\item $R^pF(\mathcal{F}) = 0$ for all $p \geq N$ and $\mathcal{F}$
quasi-coherent.
\end{enumerate}
Then for $E \in D_\QCoh(\mathcal{O}_X)$
\begin{enumerate}
\item $H^i(RF(\tau_{\leq a}E) \to H^i(RF(E))$ is an isomorphism
for $i \leq a$,
\item $H^i(RF(E)) \to H^i(RF(\tau_{\geq b - N + 1}E))$ is an isomorphism
for $i \geq b$,
\item if $H^i(E) = 0$ for $i \not \in [a, b]$ for some
$-\infty \leq a \leq b \leq \infty$, then $H^i(RF(E)) = 0$
for $i \not \in [a, b + N - 1]$.
\end{enumerate}
\end{lemma}

\begin{proof}
Statement (1) is
Derived Categories, Lemma \ref{derived-lemma-negative-vanishing}.

\medskip\noindent
Proof of statement (2). Write $E_n = \tau_{\geq -n}E$. We have
$E = R\lim E_n$, see Lemma \ref{lemma-nice-K-injective}. Thus
$RF(E) = R\lim RF(E_n)$ in $D(\textit{Ab})$ by Injectives, Lemma
\ref{injectives-lemma-RF-commutes-with-Rlim}. Thus for every $i \in \mathbf{Z}$
we have a short exact sequence
$$
0 \to R^1\lim H^{i - 1}(RF(E_n)) \to H^i(RF(E)) \to \lim H^i(RF(E_n)) \to 0
$$
see More on Algebra, Remark
\ref{more-algebra-remark-compare-derived-limit}.
To prove (2) we will show that the term on the left is zero
and that the term on the right equals $H^i(RF(E_{-b + N - 1})$
for any $b$ with $i \geq b$.

\medskip\noindent
For every $n$ we have a distinguished triangle
$$
H^{-n}(E)[n] \to E_n \to E_{n - 1} \to H^{-n}(E)[n + 1]
$$
(Derived Categories, Remark
\ref{derived-remark-truncation-distinguished-triangle})
in $D(\mathcal{O}_X)$. Since $H^{-n}(E)$ is quasi-coherent we have
$$
H^i(RF(H^{-n}(E)[n])) = R^{i + n}F(H^{-n}(E)) = 0
$$
for $i + n \geq N$ and
$$
H^i(RF(H^{-n}(E)[n + 1])) = R^{i + n + 1}F(H^{-n}(E)) = 0
$$
for $i + n + 1 \geq N$. We conclude that
$$
H^i(RF(E_n)) \to H^i(RF(E_{n - 1}))
$$
is an isomorphism for $n \geq N - i$. Thus the systems $H^i(RF(E_n))$ all
satisfy the ML condition and the $R^1\lim$ term in our short exact
sequence is zero (see discussion in
More on Algebra, Section \ref{more-algebra-section-Rlim}).
Moreover, the system $H^i(RF(E_n))$ is constant starting
with $n = N - i - 1$ as desired.

\medskip\noindent
Proof of (3). Under the assumption on $E$ we have
$\tau_{\leq a - 1}E = 0$ and we get the vanishing
of $H^i(RF(E))$ for $i \leq a - 1$ from (1).
Similarly, we have $\tau_{\geq b + 1}E = 0$ and hence
we get the vanishing of $H^i(RF(E))$ for $i \geq b + n$ from
part (2).
\end{proof}









\section{Total direct image}
\label{section-total-direct-image}

\noindent
The following lemma is the analogue of
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-vanishing-higher-direct-images}.

\begin{lemma}
\label{lemma-quasi-coherence-direct-image}
Let $S$ be a scheme. Let $f : X \to Y$ be a quasi-separated and quasi-compact
morphism of algebraic spaces over $S$.
\begin{enumerate}
\item The functor $Rf_*$ sends $D_\QCoh(\mathcal{O}_X)$
into $D_\QCoh(\mathcal{O}_Y)$.
\item If $Y$ is quasi-compact, there exists an integer $N = N(X, Y, f)$
such that for an object $E$ of $D_\QCoh(\mathcal{O}_X)$
with $H^m(E) = 0$ for $m > 0$ we have
$H^m(Rf_*E) = 0$ for $m \geq N$.
\item In fact, if $Y$ is quasi-compact we can find $N = N(X, Y, f)$
such that for every morphism of algebraic spaces $Y' \to Y$
the same conclusion holds for the functor $R(f')_*$
where $f' : X' \to Y'$ is the base change of $f$.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $E$ be an object of $D_\QCoh(\mathcal{O}_X)$.
To prove (1) we have to show that $Rf_*E$ has quasi-coherent
cohomology sheaves. This question is local on $Y$, hence we may
assume $Y$ is quasi-compact. Pick $N = N(X, Y, f)$ as in
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-vanishing-higher-direct-images}.
Thus $R^pf_*\mathcal{F} = 0$ for all quasi-coherent $\mathcal{O}_X$-modules
$\mathcal{F}$ and all $p \geq N$. Moreover $R^pf_*\mathcal{F}$
is quasi-coherent for all $p$ by
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-higher-direct-image}.
These statements remain true after base change.

\medskip\noindent
First, assume $E$ is bounded below. We will show (1) and (2) and (3) hold
for such $E$ with our choice of $N$. In this case we can for example use the
spectral sequence
$$
R^pf_*H^q(E) \Rightarrow R^{p + q}f_*E
$$
(Derived Categories, Lemma \ref{derived-lemma-two-ss-complex-functor}),
the quasi-coherence of $R^pf_*H^q(E)$, and the vanishing of $R^pf_*H^q(E)$
for $p \geq N$ to see that (1), (2), and (3) hold in this case.

\medskip\noindent
Next we prove (2) and (3). Say $H^m(E) = 0$ for $m > 0$.
Let $V$ be an affine object of $Y_\etale$.
We have $H^p(V \times_Y X, \mathcal{F}) = 0$ for $p \geq N$, see
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-quasi-coherence-higher-direct-images-application}.
Hence we may apply Lemma \ref{lemma-application-nice-K-injective}
to the functor $\Gamma(V \times_Y X, -)$ to see that
$$
R\Gamma(V, Rf_*E) = R\Gamma(V \times_Y X, E)
$$
has vanishing cohomology in degrees $\geq N$. Since this holds for
all $V$ affine in $Y_\etale$ we conclude that $H^m(Rf_*E) = 0$
for $m \geq N$.

\medskip\noindent
Next, we prove (1) in the general case. Recall that there is a
distinguished triangle
$$
\tau_{\leq -n - 1}E \to E \to \tau_{\geq -n}E \to
(\tau_{\leq -n - 1}E)[1]
$$
in $D(\mathcal{O}_X)$, see Derived Categories, Remark
\ref{derived-remark-truncation-distinguished-triangle}.
By (2) we see that $Rf_*\tau_{\leq -n - 1}E$
has vanishing cohomology sheaves in degrees $\geq -n + N$.
Thus, given an integer $q$ we see that $R^qf_*E$ is equal
to $R^qf_*\tau_{\geq -n}E$ for some $n$ and the result
above applies.
\end{proof}

\begin{lemma}
\label{lemma-quasi-coherence-pushforward-direct-sums}
Let $S$ be a scheme. Let $f : X \to Y$ be a quasi-separated and
quasi-compact morphism of algebraic spaces over $S$. Then
$Rf_* : D_\QCoh(\mathcal{O}_X) \to D_\QCoh(\mathcal{O}_Y)$
commutes with direct sums.
\end{lemma}

\begin{proof}
Let $E_i$ be a family of objects of $D_\QCoh(\mathcal{O}_X)$
and set $E = \bigoplus E_i$. We want to show that the map
$$
\bigoplus Rf_*E_i \longrightarrow Rf_*E
$$
is an isomorphism. We will show it induces an isomorphism on
cohomology sheaves in degree $0$ which will imply the lemma.
Choose an integer $N$ as in Lemma \ref{lemma-quasi-coherence-direct-image}.
Then $R^0f_*E = R^0f_*\tau_{\geq -N}E$ and
$R^0f_*E_i = R^0f_*\tau_{\geq -N}E_i$ by the lemma cited. Observe that
$\tau_{\geq -N}E = \bigoplus \tau_{\geq -N}E_i$.
Thus we may assume all of the $E_i$ have vanishing cohomology
sheaves in degrees $< -N$. Next we use the spectral sequences
$$
R^pf_*H^q(E) \Rightarrow R^{p + q}f_*E
\quad\text{and}\quad
R^pf_*H^q(E_i) \Rightarrow R^{p + q}f_*E_i
$$
(Derived Categories, Lemma \ref{derived-lemma-two-ss-complex-functor})
to reduce to the case of a direct sum of quasi-coherent sheaves.
This case is handled by
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-colimit-cohomology}.
\end{proof}

\begin{remark}
\label{remark-match-total-direct-images}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of representable
algebraic spaces $X$ and $Y$ over $S$. Let $f_0 : X_0 \to Y_0$ be a
morphism of schemes representing $f$ (awkward but temporary notation).
Then the diagram
$$
\xymatrix{
D_\QCoh(\mathcal{O}_{X_0})
\ar@{=}[rrrrrr]_{\text{Lemma
\ref{lemma-derived-quasi-coherent-small-etale-site}}}
& & & & & &
D_\QCoh(\mathcal{O}_X) \\
D_\QCoh(\mathcal{O}_{Y_0})
\ar[u]^{Lf^*_0}
\ar@{=}[rrrrrr]^{\text{Lemma
\ref{lemma-derived-quasi-coherent-small-etale-site}}}
& & & & & &
D_\QCoh(\mathcal{O}_Y) \ar[u]_{Lf^*}
}
$$
(Lemma \ref{lemma-quasi-coherence-pullback} and
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-quasi-coherence-pullback})
is commutative. This follows as the
equivalences
$D_\QCoh(\mathcal{O}_{X_0}) \to D_\QCoh(\mathcal{O}_X)$
and
$D_\QCoh(\mathcal{O}_{Y_0}) \to D_\QCoh(\mathcal{O}_Y)$
of Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}
come from pulling back by the (flat) morphisms of ringed sites
$\epsilon : X_\etale \to X_{0, Zar}$ and
$\epsilon : Y_\etale \to Y_{0, Zar}$
and the diagram of ringed sites
$$
\xymatrix{
X_{0, Zar} \ar[d]_{f_0} & X_\etale \ar[l]^\epsilon \ar[d]^f \\
Y_{0, Zar} & Y_\etale \ar[l]_\epsilon
}
$$
is commutative (details omitted). If $f$ is quasi-compact and
quasi-separated, equivalently if $f_0$ is quasi-compact and
quasi-separated, then we claim
$$
\xymatrix{
D_\QCoh(\mathcal{O}_{X_0})
\ar[d]_{Rf_{0, *}} \ar@{=}[rrrrrr]_{\text{Lemma
\ref{lemma-derived-quasi-coherent-small-etale-site}}}
& & & & & &
D_\QCoh(\mathcal{O}_X) \ar[d]^{Rf_*} \\
D_\QCoh(\mathcal{O}_{Y_0})
\ar@{=}[rrrrrr]^{\text{Lemma
\ref{lemma-derived-quasi-coherent-small-etale-site}}}
& & & & & &
D_\QCoh(\mathcal{O}_Y)
}
$$
(Lemma \ref{lemma-quasi-coherence-direct-image} and
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-quasi-coherence-direct-image})
is commutative as well. This also follows from the commutative
diagram of sites displayed above as the proof of Lemma
\ref{lemma-derived-quasi-coherent-small-etale-site}
shows that the functor $R\epsilon_*$ gives the equivalences
$D_\QCoh(\mathcal{O}_X) \to D_\QCoh(\mathcal{O}_{X_0})$
and
$D_\QCoh(\mathcal{O}_Y) \to D_\QCoh(\mathcal{O}_{Y_0})$.
\end{remark}

\begin{lemma}
\label{lemma-affine-morphism}
Let $S$ be a scheme. Let $f : X \to Y$ be an affine morphism of algebraic
spaces over $S$. Then
$Rf_* : D_\QCoh(\mathcal{O}_X) \to D_\QCoh(\mathcal{O}_Y)$
reflects isomorphisms.
\end{lemma}

\begin{proof}
The statement means that a morphism $\alpha : E \to F$ of
$D_\QCoh(\mathcal{O}_X)$ is an isomorphism if
$Rf_*\alpha$ is an isomorphism. We may check this on cohomology sheaves.
In particular, the question is \'etale local on $Y$. Hence we may assume
$Y$ and therefore $X$ is affine. In this case the problem reduces to the
case of schemes
(Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-morphism})
via Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} and
Remark \ref{remark-match-total-direct-images}.
\end{proof}

\begin{lemma}
\label{lemma-affine-morphism-pull-push}
Let $S$ be a scheme. Let $f : X \to Y$ be an affine morphism of algebraic
spaces over $S$. For $E$ in $D_\QCoh(\mathcal{O}_Y)$ we have
$Rf_* Lf^* E = E \otimes^\mathbf{L}_{\mathcal{O}_Y} f_*\mathcal{O}_X$.
\end{lemma}

\begin{proof}
Since $f$ is affine the map $f_*\mathcal{O}_X \to Rf_*\mathcal{O}_X$
is an isomorphism (Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-affine-vanishing-higher-direct-images}).
There is a canonical map
$E \otimes^\mathbf{L} f_*\mathcal{O}_X =
E \otimes^\mathbf{L} Rf_*\mathcal{O}_X \to Rf_* Lf^* E$
adjoint to the map
$$
Lf^*(E \otimes^\mathbf{L} Rf_*\mathcal{O}_X) =
Lf^*E \otimes^\mathbf{L} Lf^*Rf_*\mathcal{O}_X \longrightarrow
Lf^* E \otimes^\mathbf{L} \mathcal{O}_X = Lf^* E
$$
coming from $1 : Lf^*E \to Lf^*E$ and the canonical map
$Lf^*Rf_*\mathcal{O}_X \to \mathcal{O}_X$. To check the map so constructed
is an isomorphism we may work locally on $Y$. Hence we may assume
$Y$ and therefore $X$ is affine. In this case the problem reduces to the
case of schemes
(Derived Categories of Schemes, Lemma
\ref{perfect-lemma-affine-morphism-pull-push})
via Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} and
Remark \ref{remark-match-total-direct-images}.
\end{proof}








\section{Being proper over a base}
\label{section-proper-over-base}

\noindent
This section is the analogue of Cohomology of Schemes, Section
\ref{coherent-section-proper-over-base}.
As usual with material having to do with topology on the sets of points,
we have to be careful translating the material to algebraic spaces.

\begin{lemma}
\label{lemma-closed-proper-over-base}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is locally of finite type. Let $T \subset |X|$ be a closed
subset. The following are equivalent
\begin{enumerate}
\item the morphism $Z \to Y$ is proper if $Z$ is the reduced
induced algebraic space structure on $T$
(Properties of Spaces, Definition
\ref{spaces-properties-definition-reduced-induced-space}),
\item for some closed subspace $Z \subset X$ with $|Z| = T$
the morphism $Z \to Y$ is proper, and
\item for any closed subspace $Z \subset X$ with $|Z| = T$ the morphism
$Z \to Y$ is proper.
\end{enumerate}
\end{lemma}

\begin{proof}
The implications (3) $\Rightarrow$ (1) and (1) $\Rightarrow$ (2)
are immediate. Thus it suffices to prove that (2) implies (3).
We urge the reader to find their own proof of this fact.
Let $Z'$ and $Z''$ be closed subspaces with $T = |Z'| = |Z''|$
such that $Z' \to Y$ is a proper morphism of algebraic spaces.
We have to show that $Z'' \to Y$ is proper too.
Let $Z''' = Z' \cup Z''$ be the scheme theoretic union, see
Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-scheme-theoretic-intersection-union}.
Then $Z'''$ is another closed subspace with $|Z'''| = T$.
This follows for example from the description of scheme theoretic unions in
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-scheme-theoretic-union}.
Since $Z'' \to Z'''$ is a closed immersion it suffices to prove
that $Z''' \to Y$ is proper (see
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-closed-immersion-proper} and
\ref{spaces-morphisms-lemma-composition-proper}).
The morphism $Z' \to Z'''$ is a bijective closed immersion
and in particular surjective and universally closed.
Then the fact that $Z' \to Y$ is separated implies that
$Z''' \to Y$ is separated, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-image-universally-closed-separated}.
Moreover $Z''' \to Y$ is locally of finite type
as $X \to Y$ is locally of finite type
(Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-immersion-locally-finite-type} and
\ref{spaces-morphisms-lemma-composition-finite-type}).
Since $Z' \to Y$ is quasi-compact and $Z' \to Z'''$ is a
universal homeomorphism we see that $Z''' \to Y$ is quasi-compact.
Finally, since $Z' \to Y$ is universally closed, we see that
the same thing is true for $Z''' \to Y$ by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-image-proper-is-proper}.
This finishes the proof.
\end{proof}

\begin{definition}
\label{definition-proper-over-base}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is locally of finite type.
Let $T \subset |X|$ be a closed subset.
We say {\it $T$ is proper over $Y$}
if the equivalent conditions of Lemma \ref{lemma-closed-proper-over-base}
are satisfied.
\end{definition}

\noindent
The lemma used in the definition above is false if the morphism
$f : X \to Y$ is not locally of finite type. Therefore we urge
the reader not to use this terminology if $f$ is not locally of
finite type.

\begin{lemma}
\label{lemma-closed-closed-proper-over-base}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is locally of finite type.
Let $T' \subset T \subset |X|$ be closed subsets.
If $T$ is proper over $Y$, then the same is true for $T'$.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-base-change-closed-proper-over-base}
Let $S$ be a scheme.
Consider a cartesian diagram of algebraic spaces over $S$
$$
\xymatrix{
X' \ar[d]_{f'} \ar[r]_{g'} & X \ar[d]^f \\
Y' \ar[r]^g & Y
}
$$
with $f$ locally of finite type.
If $T$ is a closed subset of $|X|$ proper over $Y$, then
$|g'|^{-1}(T)$ is a closed subset of $|X'|$ proper over $Y'$.
\end{lemma}

\begin{proof}
Observe that the statement makes sense as $f'$ is locally of
finite type by Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-finite-type}.
Let $Z \subset X$ be the reduced induced closed subspace structure on $T$.
Denote $Z' = (g')^{-1}(Z)$ the scheme theoretic inverse image.
Then $Z' = X' \times_X Z = (Y' \times_Y X) \times_X Z = Y' \times_Y Z$
is proper over $Y'$ as a base change of $Z$ over $Y$
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-proper}).
On the other hand, we have $T' = |Z'|$. Hence the lemma holds.
\end{proof}

\begin{lemma}
\label{lemma-functoriality-closed-proper-over-base}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $f : X \to Y$ be a morphism of algebraic spaces which
are locally of finite type over $B$.
\begin{enumerate}
\item If $Y$ is separated over $B$ and $T \subset |X|$ is a closed subset
proper over $B$, then $|f|(T)$ is a closed subset of $|Y|$ proper over $B$.
\item If $f$ is universally closed and $T \subset |X|$ is a
closed subset proper over $B$, then $|f|(T)$ is a closed subset
of $Y$ proper over $B$.
\item If $f$ is proper and $T \subset |Y|$ is a closed subset
proper over $B$, then $|f|^{-1}(T)$ is a closed subset of $|X|$
proper over $B$.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). Assume $Y$ is separated over $B$ and $T \subset |X|$
is a closed subset proper over $B$. Let $Z$ be the reduced induced
closed subspace structure on $T$ and apply
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-scheme-theoretic-image-is-proper}
to $Z \to Y$ over $B$ to conclude.

\medskip\noindent
Proof of (2). Assume $f$ is universally closed and $T \subset |X|$ is a
closed subset proper over $B$. Let $Z$ be the reduced induced
closed subspace structure on $T$ and let $Z'$ be the reduced
induced closed subspace structure on $|f|(T)$. We obtain an induced
morphism $Z \to Z'$.
Denote $Z'' = f^{-1}(Z')$ the scheme theoretic inverse image.
Then $Z'' \to Z'$ is universally closed as a base change of $f$
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-proper}).
Hence $Z \to Z'$ is universally closed as a composition of
the closed immersion $Z \to Z''$ and $Z'' \to Z'$
(Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-closed-immersion-proper} and
\ref{spaces-morphisms-lemma-composition-proper}).
We conclude that $Z' \to B$ is separated by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-image-universally-closed-separated}.
Since $Z \to B$ is quasi-compact and $Z \to Z'$ is surjective
we see that $Z' \to B$ is quasi-compact.
Since $Z' \to B$ is the composition of $Z' \to Y$ and $Y \to B$
we see that $Z' \to B$ is locally of finite type
(Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-immersion-locally-finite-type} and
\ref{spaces-morphisms-lemma-composition-finite-type}).
Finally, since $Z \to B$ is universally closed, we see that
the same thing is true for $Z' \to B$ by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-image-proper-is-proper}.
This finishes the proof.

\medskip\noindent
Proof of (3). Assume $f$ is proper and $T \subset |Y|$ is a closed subset
proper over $B$. Let $Z$ be the reduced induced closed subspace
structure on $T$. Denote $Z' = f^{-1}(Z)$ the scheme theoretic inverse image.
Then $Z' \to Z$ is proper as a base change of $f$
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-proper}).
Whence $Z' \to B$ is proper as the composition of $Z' \to Z$
and $Z \to B$
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-proper}).
This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-union-closed-proper-over-base}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is locally of finite type.
Let $T_i \subset |X|$, $i = 1, \ldots, n$ be closed subsets.
If $T_i$, $i = 1, \ldots, n$ are proper over $Y$, then the same is
true for $T_1 \cup \ldots \cup T_n$.
\end{lemma}

\begin{proof}
Let $Z_i$ be the reduced induced closed subscheme structure on $T_i$.
The morphism
$$
Z_1 \amalg \ldots \amalg Z_n \longrightarrow X
$$
is finite by Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-closed-immersion-finite} and
\ref{spaces-morphisms-lemma-finite-union-finite}.
As finite morphisms are universally closed
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-proper})
and since $Z_1 \amalg \ldots \amalg Z_n$ is proper over $S$
we conclude by
Lemma \ref{lemma-functoriality-closed-proper-over-base} part (2)
that the image $Z_1 \cup \ldots \cup Z_n$ is proper over $S$.
\end{proof}

\noindent
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is locally
of finite type. Let $\mathcal{F}$ be a finite type, quasi-coherent
$\mathcal{O}_X$-module. Then the support $\text{Supp}(\mathcal{F})$
of $\mathcal{F}$ is a closed subset of $|X|$, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-support-finite-type}.
Hence it makes sense to say
``the support of $\mathcal{F}$ is proper over $Y$''.

\begin{lemma}
\label{lemma-module-support-proper-over-base}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of
algebraic spaces over $S$ which is locally of finite type.
Let $\mathcal{F}$ be a finite type, quasi-coherent
$\mathcal{O}_X$-module. The following are equivalent
\begin{enumerate}
\item the support of $\mathcal{F}$ is proper over $Y$,
\item the scheme theoretic support of $\mathcal{F}$
(Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-scheme-theoretic-support})
is proper over $Y$, and
\item there exists a closed subspace $Z \subset X$ and
a finite type, quasi-coherent $\mathcal{O}_Z$-module
$\mathcal{G}$ such that (a) $Z \to Y$ is proper, and (b)
$(Z \to X)_*\mathcal{G} = \mathcal{F}$.
\end{enumerate}
\end{lemma}

\begin{proof}
The support $\text{Supp}(\mathcal{F})$ of $\mathcal{F}$ is a closed subset
of $|X|$, see Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-support-finite-type}.
Hence we can apply Definition \ref{definition-proper-over-base}.
Since the scheme theoretic support of $\mathcal{F}$ is a closed
subspace whose underlying closed subset is $\text{Supp}(\mathcal{F})$
we see that (1) and (2) are equivalent by
Definition \ref{definition-proper-over-base}.
It is clear that (2) implies (3).
Conversely, if (3) is true, then
$\text{Supp}(\mathcal{F}) \subset |Z|$
and hence $\text{Supp}(\mathcal{F})$
is proper over $Y$ for example by
Lemma \ref{lemma-closed-closed-proper-over-base}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-module-support-proper-over-base}
Let $S$ be a scheme.
Consider a cartesian diagram of algebraic spaces over $S$
$$
\xymatrix{
X' \ar[d]_{f'} \ar[r]_{g'} & X \ar[d]^f \\
Y' \ar[r]^g & Y
}
$$
with $f$ locally of finite type. Let $\mathcal{F}$ be a
finite type, quasi-coherent $\mathcal{O}_X$-module.
If the support of $\mathcal{F}$ is proper over $Y$, then
the support of $(g')^*\mathcal{F}$ is proper over $Y'$.
\end{lemma}

\begin{proof}
Observe that the statement makes sense because
$(g')*\mathcal{F}$ is of finite type by
Modules on Sites, Lemma \ref{sites-modules-lemma-local-pullback}.
We have $\text{Supp}((g')^*\mathcal{F}) = |g'|^{-1}(\text{Supp}(\mathcal{F}))$
by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-support-finite-type}.
Thus the lemma follows from
Lemma \ref{lemma-base-change-closed-proper-over-base}.
\end{proof}

\begin{lemma}
\label{lemma-cat-module-support-proper-over-base}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is locally of finite type. Let $\mathcal{F}$, $\mathcal{G}$
be finite type, quasi-coherent $\mathcal{O}_X$-module.
\begin{enumerate}
\item If the supports of $\mathcal{F}$, $\mathcal{G}$
are proper over $Y$, then the same is true
for $\mathcal{F} \oplus \mathcal{G}$, for any extension
of $\mathcal{G}$ by $\mathcal{F}$, for $\Im(u)$ and $\Coker(u)$
given any $\mathcal{O}_X$-module map $u : \mathcal{F} \to \mathcal{G}$,
and for any quasi-coherent quotient of $\mathcal{F}$ or $\mathcal{G}$.
\item If $Y$ is locally Noetherian, then the category of
coherent $\mathcal{O}_X$-modules with support proper over
$Y$ is a Serre subcategory (Homology, Definition
\ref{homology-definition-serre-subcategory})
of the abelian category of
coherent $\mathcal{O}_X$-modules.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). Let $T$, $T'$ be the support of $\mathcal{F}$
and $\mathcal{G}$. Then all the sheaves mentioned in (1)
have support contained in $T \cup T'$. Thus the assertion itself
is clear from Lemmas \ref{lemma-closed-closed-proper-over-base} and
\ref{lemma-union-closed-proper-over-base}
provided we check that these sheaves are finite type
and quasi-coherent.
For quasi-coherence we refer the reader to
Properties of Spaces, Section \ref{spaces-properties-section-quasi-coherent}.
For ``finite type'' we refer the reader to
Properties of Spaces, Section
\ref{spaces-properties-section-properties-modules}.

\medskip\noindent
Proof of (2). The proof is the same as the proof of (1). Note that
the assertions make sense as $X$ is locally Noetherian by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-finite-type-locally-noetherian}
and by the description of the category of coherent modules in
Cohomology of Spaces, Section \ref{spaces-cohomology-section-coherent}.
\end{proof}

\begin{lemma}
\label{lemma-support-proper-over-base-pushforward}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume $f$ is locally of finite type and $Y$ locally Noetherian.
Let $\mathcal{F}$ be a coherent $\mathcal{O}_X$-module with support
proper over $Y$. Then $R^pf_*\mathcal{F}$ is a coherent
$\mathcal{O}_Y$-module for all $p \geq 0$.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-module-support-proper-over-base}
there exists a closed immersion $i : Z \to X$ with
$g = f \circ i : Z \to Y$ proper and
$\mathcal{F} = i_*\mathcal{G}$ for some coherent module $\mathcal{G}$
on $Z$. We see that $R^pg_*\mathcal{G}$
is coherent on $S$ by Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-proper-pushforward-coherent}.
On the other hand, $R^qi_*\mathcal{G} = 0$ for $q > 0$
(Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-finite-pushforward-coherent}).
By Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-relative-Leray}
we get $R^pf_*\mathcal{F} = R^pg_*\mathcal{G}$ and the lemma follows.
\end{proof}






\section{Derived category of coherent modules}
\label{section-derived-coherent}

\noindent
Let $S$ be a scheme. Let $X$ be a locally Noetherian algebraic space over $S$.
In this case the category
$\textit{Coh}(\mathcal{O}_X) \subset \textit{Mod}(\mathcal{O}_X)$
of coherent $\mathcal{O}_X$-modules is a weak Serre subcategory, see
Homology, Section \ref{homology-section-serre-subcategories}
and
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-coherent-abelian-Noetherian}.
Denote
$$
D_{\textit{Coh}}(\mathcal{O}_X) \subset D(\mathcal{O}_X)
$$
the subcategory of complexes whose cohomology sheaves are coherent, see
Derived Categories, Section \ref{derived-section-triangulated-sub}.
Thus we obtain a canonical functor
\begin{equation}
\label{equation-compare-coherent}
D(\textit{Coh}(\mathcal{O}_X))
\longrightarrow
D_{\textit{Coh}}(\mathcal{O}_X)
\end{equation}
see Derived Categories, Equation (\ref{derived-equation-compare}).

\begin{lemma}
\label{lemma-direct-image-coherent}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume $f$ is locally of finite type and $Y$ is Noetherian.
Let $E$ be an object of $D^b_{\textit{Coh}}(\mathcal{O}_X)$ such that the
support of $H^i(E)$ is proper over $Y$ for all $i$.
Then $Rf_*E$ is an object of $D^b_{\textit{Coh}}(\mathcal{O}_Y)$.
\end{lemma}

\begin{proof}
Consider the spectral sequence
$$
R^pf_*H^q(E) \Rightarrow R^{p + q}f_*E
$$
see Derived Categories, Lemma \ref{derived-lemma-two-ss-complex-functor}.
By assumption and Lemma \ref{lemma-support-proper-over-base-pushforward}
the sheaves $R^pf_*H^q(E)$ are coherent. Hence
$R^{p + q}f_*E$ is coherent, i.e., $E \in D_{\textit{Coh}}(\mathcal{O}_Y)$.
Boundedness from below is trivial. Boundedness from above
follows from
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-vanishing-higher-direct-images}
or from
Lemma \ref{lemma-quasi-coherence-direct-image}.
\end{proof}

\begin{lemma}
\label{lemma-direct-image-coherent-bdd-below}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume $f$ is locally of finite type and $Y$ is Noetherian.
Let $E$ be an object of
$D^+_{\textit{Coh}}(\mathcal{O}_X)$ such that the support of $H^i(E)$
is proper over $S$ for all $i$.
Then $Rf_*E$ is an object of $D^+_{\textit{Coh}}(\mathcal{O}_Y)$.
\end{lemma}

\begin{proof}
The proof is the same as the proof of
Lemma \ref{lemma-direct-image-coherent}.
You can also deduce it from
Lemma \ref{lemma-direct-image-coherent}
by considering what the exact functor $Rf_*$ does to
the distinguished triangles
$\tau_{\leq a}E \to E \to \tau_{\geq a + 1}E \to \tau_{\leq a}E[1]$.
\end{proof}

\begin{lemma}
\label{lemma-coherent-internal-hom}
Let $S$ be a scheme. Let $X$ be a locally Noetherian algebraic space over $S$.
If $L$ is in $D^+_{\textit{Coh}}(\mathcal{O}_X)$
and $K$ in $D^-_{\textit{Coh}}(\mathcal{O}_X)$, then
$R\SheafHom(K, L)$ is in $D^+_{\textit{Coh}}(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
We can check whether an object of $D(\mathcal{O}_X)$ is in
$D_{\textit{Coh}}(\mathcal{O}_X)$ \'etale locally on $X$, see
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-coherent-Noetherian}.
Hence this lemma follows from the case of schemes, see
Derived Categories of Schemes, Lemma \ref{perfect-lemma-coherent-internal-hom}.
\end{proof}

\begin{lemma}
\label{lemma-ext-finite}
Let $A$ be a Noetherian ring. Let $X$ be a proper algebraic space over $A$.
For $L$ in $D^+_{\textit{Coh}}(\mathcal{O}_X)$ and $K$ in
$D^-_{\textit{Coh}}(\mathcal{O}_X)$, the $A$-modules
$\Ext_{\mathcal{O}_X}^n(K, L)$ are finite.
\end{lemma}

\begin{proof}
Recall that
$$
\Ext_{\mathcal{O}_X}^n(K, L) =
H^n(X, R\SheafHom_{\mathcal{O}_X}(K, L)) =
H^n(\Spec(A), Rf_*R\SheafHom_{\mathcal{O}_X}(K, L))
$$
see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-section-RHom-over-U}
and Cohomology on Sites, Section \ref{sites-cohomology-section-leray}.
Thus the result follows from
Lemmas \ref{lemma-coherent-internal-hom} and
\ref{lemma-direct-image-coherent-bdd-below}.
\end{proof}




\section{Induction principle}
\label{section-induction}

\noindent
In this section we discuss an induction principle for algebraic spaces
analogous to what is
Cohomology of Schemes, Lemma \ref{coherent-lemma-induction-principle}
for schemes. To formulate it we introduce the notion of an
{\it elementary distinguished square}; this terminology is borrowed
from \cite{MV}.
The principle as formulated here is implicit in the paper \cite{GruRay}
by Raynaud and Gruson.
A related principle for algebraic stacks is
\cite[Theorem D]{rydh_etale_devissage} by David Rydh.

\begin{definition}
\label{definition-elementary-distinguished-square}
Let $S$ be a scheme. A commutative diagram
$$
\xymatrix{
U \times_W V \ar[r] \ar[d] & V \ar[d]^f \\
U \ar[r]^j & W
}
$$
of algebraic spaces over $S$ is called an {\it elementary distinguished square}
if
\begin{enumerate}
\item $U$ is an open subspace of $W$ and $j$ is the inclusion morphism,
\item $f$ is \'etale, and
\item setting $T = W \setminus U$ (with reduced induced
subspace structure) the morphism $f^{-1}(T) \to T$ is an isomorphism.
\end{enumerate}
We will indicate this by saying: ``Let $(U \subset W, f : V \to W)$
be an elementary distinguished square.''
\end{definition}

\noindent
Note that if $(U \subset W, f : V \to W)$ is an elementary distinguished
square, then we have $W = U \cup f(V)$. Thus $\{U \to W, V \to W\}$ is
an \'etale covering of $W$. It turns out that these \'etale coverings
have nice properties and that in some sense
there are ``enough'' of them.

\begin{lemma}
\label{lemma-make-more-elementary-distinguished-squares}
Let $S$ be a scheme. Let $(U \subset W, f : V \to W)$ be an elementary
distinguished square of algebraic spaces over $S$.
\begin{enumerate}
\item If $V' \subset V$ and
$U \subset U' \subset W$ are open subspaces and $W' = U' \cup f(V')$
then $(U' \subset W', f|_{V'} : V' \to W')$ is an elementary distinguished
square.
\item If $p : W' \to W$ is a morphism of algebraic spaces, then
$(p^{-1}(U) \subset W', V \times_W W' \to W')$ is an elementary distinguished
square.
\item If $S' \to S$ is a morphism of schemes, then
$(S' \times_S U \subset S' \times_S W, S' \times_S V \to S' \times_S W)$
is an elementary distinguished square.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-induction-principle}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $P$ be a property of the quasi-compact
and quasi-separated objects of $X_{spaces, \etale}$. Assume that
\begin{enumerate}
\item $P$ holds for every affine object of $X_{spaces, \etale}$,
\item for every elementary distinguished square $(U \subset W, f : V \to W)$
such that
\begin{enumerate}
\item $W$ is a quasi-compact and quasi-separated object of
$X_{spaces, \etale}$,
\item $U$ is quasi-compact,
\item $V$ is affine, and
\item $P$ holds for $U$, $V$, and $U \times_W V$,
\end{enumerate}
then $P$ holds for $W$.
\end{enumerate}
Then $P$ holds for every quasi-compact and quasi-separated object
of $X_{spaces, \etale}$ and in particular for $X$.
\end{lemma}

\begin{proof}
We first claim that $P$ holds for every representable
quasi-compact and quasi-separated object of $X_{spaces, \etale}$.
Namely, suppose that $U \to X$ is \'etale and $U$ is a
quasi-compact and quasi-separated scheme. By assumption (1)
property $P$ holds for every affine open of $U$. Moreover, if
$W, V \subset U$ are quasi-compact open with $V$ affine and $P$ holds for 
$W$, $V$, and $W \cap V$, then $P$ holds for $W \cup V$ by (2)
(as the pair $(W \subset W \cup V, V \to W \cup V)$ is an elementary
distinguished square). Thus $P$ holds for $U$ by the induction
principle for schemes, see
Cohomology of Schemes, Lemma \ref{coherent-lemma-induction-principle}.

\medskip\noindent
To finish the proof it suffices to prove $P$ holds for $X$
(because we can simply replace $X$ by any quasi-compact and quasi-separated
object of $X_{spaces, \etale}$ we want to prove the result for).
We will use the filtration
$$
\emptyset = U_{n + 1} \subset
U_n \subset U_{n - 1} \subset \ldots \subset U_1 = X
$$
and the morphisms $f_p : V_p \to U_p$ of
Decent Spaces, Lemma
\ref{decent-spaces-lemma-filter-quasi-compact-quasi-separated}.
We will prove that $P$ holds for $U_p$ by descending induction on $p$.
Note that $P$ holds for $U_{n + 1}$ by (1)
as an empty algebraic space is affine. Assume $P$ holds for $U_{p + 1}$.
Note that $(U_{p + 1} \subset U_p, f_p : V_p \to U_p)$ is an elementary
distinguished square, but (2) may not apply as $V_p$ may not be affine.
However, as $V_p$ is a quasi-compact scheme we may choose a finite affine open
covering $V_p = V_{p, 1} \cup \ldots \cup V_{p, m}$.
Set $W_{p, 0} = U_{p + 1}$ and
$$
W_{p, i} = U_{p + 1} \cup f_p(V_{p, 1} \cup \ldots \cup V_{p, i})
$$
for $i = 1, \ldots, m$. These are quasi-compact open subspaces of $X$.
Then we have
$$
U_{p + 1} = W_{p, 0} \subset
W_{p, 1} \subset \ldots \subset
W_{p, m} = U_p
$$
and the pairs
$$
(W_{p, 0} \subset W_{p, 1}, f_p|_{V_{p, 1}}),
(W_{p, 1} \subset W_{p, 2}, f_p|_{V_{p, 2}}),\ldots,
(W_{p, m - 1} \subset W_{p, m}, f_p|_{V_{p, m}})
$$
are elementary distinguished squares by
Lemma \ref{lemma-make-more-elementary-distinguished-squares}.
Note that $P$ holds for each $V_{p, 1}$ (as affine schemes) and for
$W_{p, i} \times_{W_{p, i + 1}} V_{p, i + 1}$ as this is a quasi-compact
open of $V_{p, i + 1}$ and hence $P$ holds for it by the first paragraph
of this proof. Thus (2) applies to each of these and we inductively
conclude $P$ holds for $W_{p, 1}, \ldots, W_{p, m} = U_p$.
\end{proof}

\begin{lemma}
\label{lemma-induction-principle-separated}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let
$\mathcal{B} \subset \Ob(X_{spaces, \etale})$.
Let $P$ be a property of the elements of $\mathcal{B}$.
Assume that
\begin{enumerate}
\item every $W \in \mathcal{B}$ is quasi-compact and quasi-separated,
\item if $W \in \mathcal{B}$ and $U \subset W$ is quasi-compact open, then
$U \in \mathcal{B}$,
\item if $V \in \Ob(X_{spaces, \etale})$ is affine, then
(a) $V \in \mathcal{B}$ and (b) $P$ holds for $V$,
\item for every elementary distinguished square $(U \subset W, f : V \to W)$
such that
\begin{enumerate}
\item $W \in \mathcal{B}$,
\item $U$ is quasi-compact,
\item $V$ is affine, and
\item $P$ holds for $U$, $V$, and $U \times_W V$,
\end{enumerate}
then $P$ holds for $W$.
\end{enumerate}
Then $P$ holds for every $W \in \mathcal{B}$.
\end{lemma}

\begin{proof}
This is proved in exactly the same manner as the proof of
Lemma \ref{lemma-induction-principle}.
(We remark that (4)(d) makes sense as $U \times_W V$ is a quasi-compact
open of $V$ hence an element of $\mathcal{B}$ by conditions
(2) and (3).)
\end{proof}

\begin{remark}
\label{remark-how-to}
How to choose the collection $\mathcal{B}$ in
Lemma \ref{lemma-induction-principle-separated}?
Here are some examples:
\begin{enumerate}
\item If $X$ is quasi-compact and separated, then we can choose
$\mathcal{B}$ to be the set of quasi-compact and separated objects
of $X_{spaces, \etale}$. Then $X \in \mathcal{B}$ and $\mathcal{B}$
satisfies (1), (2), and (3)(a). With this choice of $\mathcal{B}$
Lemma \ref{lemma-induction-principle-separated} reproduces
Lemma \ref{lemma-induction-principle}.
\item If $X$ is quasi-compact with affine diagonal
over $\mathbf{Z}$ (as in Properties of Spaces, Definition
\ref{spaces-properties-definition-separated}), then we can choose
$\mathcal{B}$ to be the set of objects
of $X_{spaces, \etale}$ which are quasi-compact and have affine
diagonal over $\mathbf{Z}$. Again $X \in \mathcal{B}$ and $\mathcal{B}$
satisfies (1), (2), and (3)(a).
\item If $X$ is quasi-compact and quasi-separated, then the
smallest subset $\mathcal{B}$ which contains $X$ and satisfies
(1), (2), and (3)(a) is given by the rule $W \in \mathcal{B}$ if and only
if either $W$ is a quasi-compact open subspace of $X$, or
$W$ is a quasi-compact open of an affine object of $X_{spaces, \etale}$.
\end{enumerate}
\end{remark}

\noindent
Here is a variant where we extend the truth from an open to larger opens.

\begin{lemma}
\label{lemma-induction-principle-enlarge}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $W \subset X$ be a quasi-compact open
subspace. Let $P$ be a property of quasi-compact open subspaces of $X$.
Assume that
\begin{enumerate}
\item $P$ holds for $W$, and
\item for every elementary distinguished square
$(W_1 \subset W_2, f : V \to W_2)$ where 
such that
\begin{enumerate}
\item $W_1$, $W_2$ are quasi-compact open subspaces of $X$,
\item $W \subset W_1$,
\item $V$ is affine, and
\item $P$ holds for $W_1$,
\end{enumerate}
then $P$ holds for $W_2$.
\end{enumerate}
Then $P$ holds for $X$.
\end{lemma}

\begin{proof}
We can deduce this from Lemma \ref{lemma-induction-principle-separated},
but instead we will give a direct argument by explicitly redoing the proof of
Lemma \ref{lemma-induction-principle}. We will use the filtration
$$
\emptyset = U_{n + 1} \subset
U_n \subset U_{n - 1} \subset \ldots \subset U_1 = X
$$
and the morphisms $f_p : V_p \to U_p$ of
Decent Spaces, Lemma
\ref{decent-spaces-lemma-filter-quasi-compact-quasi-separated}.
We will prove that $P$ holds for $W_p = W \cup U_p$ by descending
induction on $p$. This will finish the proof as $W_1 = X$.
Note that $P$ holds for $W_{n + 1} = W \cap U_{n + 1} = W$
by (1). Assume $P$ holds for $W_{p + 1}$. Observe that
$W_p \setminus W_{p + 1}$ (with reduced induced subspace structure)
is a closed subspace of $U_p \setminus U_{p + 1}$.
Since $(U_{p + 1} \subset U_p, f_p : V_p \to U_p)$ is an elementary
distinguished square, the same is true for
$(W_{p + 1} \subset W_p, f_p : V_p \to W_p)$.
However (2) may not apply as $V_p$ may not be affine.
However, as $V_p$ is a quasi-compact scheme we may choose
a finite affine open covering $V_p = V_{p, 1} \cup \ldots \cup V_{p, m}$.
Set $W_{p, 0} = W_{p + 1}$ and
$$
W_{p, i} = W_{p + 1} \cup f_p(V_{p, 1} \cup \ldots \cup V_{p, i})
$$
for $i = 1, \ldots, m$. These are quasi-compact open subspaces of $X$
containing $W$. Then we have
$$
W_{p + 1} = W_{p, 0} \subset
W_{p, 1} \subset \ldots \subset
W_{p, m} = W_p
$$
and the pairs
$$
(W_{p, 0} \subset W_{p, 1}, f_p|_{V_{p, 1}}),
(W_{p, 1} \subset W_{p, 2}, f_p|_{V_{p, 2}}),\ldots,
(W_{p, m - 1} \subset W_{p, m}, f_p|_{V_{p, m}})
$$
are elementary distinguished squares by
Lemma \ref{lemma-make-more-elementary-distinguished-squares}.
Now (2) applies to each of these and we inductively
conclude $P$ holds for $W_{p, 1}, \ldots, W_{p, m} = W_p$.
\end{proof}



\section{Mayer-Vietoris}
\label{section-mayer-vietoris}

\noindent
In this section we prove that an elementary distinguished triangle
gives rise to various Mayer-Vietoris sequences.

\medskip\noindent
Let $S$ be a scheme. Let $U \to X$ be an \'etale morphism of algebraic
spaces over $S$. In
Properties of Spaces, Section \ref{spaces-properties-section-localize}
it was shown that
$U_{spaces, \etale} = X_{spaces, \etale}/U$
compatible with structure sheaves. Hence in this situation we
often think of the morphism $j_U : U \to X$ as a localization morphism
(see Modules on Sites, Definition
\ref{sites-modules-definition-localize-ringed-site}).
In particular we think of pullback $j_U^*$ as restriction to $U$
and we often denote it by ${}|_U$; this is compatible with
Properties of Spaces, Equation
(\ref{spaces-properties-equation-restrict-modules}).
In particular we see that
\begin{equation}
\label{equation-stalk-restriction}
(\mathcal{F}|_U)_{\overline{u}} = \mathcal{F}_{\overline{x}}
\end{equation}
if $\overline{u}$ is a geometric point of $U$ and $\overline{x}$
the image of $\overline{u}$ in $X$.
Moreover, restriction has an exact left adjoint $j_{U!}$, see
Modules on Sites, Lemmas \ref{sites-modules-lemma-extension-by-zero} and
\ref{sites-modules-lemma-extension-by-zero-exact}.
Finally, recall that if $\mathcal{G}$ is an $\mathcal{O}_X$-module,
then
\begin{equation}
\label{equation-stalk-j-shriek}
(j_{U!}\mathcal{G})_{\overline{x}} =
\bigoplus\nolimits_{\overline{u}} \mathcal{G}_{\overline{u}}
\end{equation}
for any geometric point $\overline{x} : \Spec(k) \to X$ where the
direct sum is over those morphisms $\overline{u} : \Spec(k) \to U$
such that $j_U \circ \overline{u} = \overline{x}$, see
Modules on Sites, Lemma \ref{sites-modules-lemma-stalk-j-shriek}
and
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-points-small-etale-site}.

\begin{lemma}
\label{lemma-exact-sequence-lower-shriek}
Let $S$ be a scheme. Let $(U \subset X, V \to X)$ be an elementary
distinguished square of algebraic spaces over $S$.
\begin{enumerate}
\item For a sheaf of $\mathcal{O}_X$-modules $\mathcal{F}$
we have a short exact sequence
$$
0 \to j_{U \times_X V!}\mathcal{F}|_{U \times_X V} \to
j_{U!}\mathcal{F}|_U \oplus j_{V!}\mathcal{F}|_V \to \mathcal{F} \to 0
$$
\item For an object $E$ of $D(\mathcal{O}_X)$ we have a distinguished
triangle
$$
j_{U \times_X V!}E|_{U \times_X V} \to
j_{U!}E|_U \oplus j_{V!}E|_V \to E \to 
j_{U \times_X V!}E|_{U \times_X V}[1]
$$
in $D(\mathcal{O}_X)$.
\end{enumerate}
\end{lemma}

\begin{proof}
To show the sequence of (1) is exact we may check on stalks at
geometric points by
Properties of Spaces, Theorem
\ref{spaces-properties-theorem-exactness-stalks}.
Let $\overline{x}$ be a geometric point of $X$. By Equations
(\ref{equation-stalk-restriction}) and (\ref{equation-stalk-j-shriek})
taking stalks at $\overline{x}$ we obtain the sequence
$$
0 \to
\bigoplus\nolimits_{(\overline{u}, \overline{v})} \mathcal{F}_{\overline{x}}
\to
\bigoplus\nolimits_{\overline{u}} \mathcal{F}_{\overline{x}}
\oplus
\bigoplus\nolimits_{\overline{v}} \mathcal{F}_{\overline{x}}
\to
\mathcal{F}_{\overline{x}} \to 0
$$
This sequence is exact because for every $\overline{x}$
there either is exactly one $\overline{u}$ mapping to $\overline{x}$,
or there is no $\overline{u}$ and exactly one $\overline{v}$
mapping to $\overline{x}$.

\medskip\noindent
Proof of (2). We have seen in Cohomology on Sites, Section
\ref{sites-cohomology-section-properties-K-injective}
that the restriction functors and the extension by zero functors
on derived categories are computed by just applying the functor
to any complex. Let $\mathcal{E}^\bullet$ be a complex
of $\mathcal{O}_X$-modules representing $E$.
The distinguished triangle of the lemma is the
distinguished triangle associated (by
Derived Categories, Section
\ref{derived-section-canonical-delta-functor} and especially
Lemma \ref{derived-lemma-derived-canonical-delta-functor})
to the short exact sequence of complexes of $\mathcal{O}_X$-modules
$$
0 \to j_{U \times_X V!}\mathcal{E}^\bullet|_{U \times_X V} \to
j_{U!}\mathcal{E}^\bullet|_U \oplus j_{V!}\mathcal{E}^\bullet|_V
\to \mathcal{E}^\bullet \to 0
$$
which is short exact by (1).
\end{proof}

\begin{lemma}
\label{lemma-exact-sequence-j-star}
Let $S$ be a scheme. Let $(U \subset X, V \to X)$ be an elementary
distinguished square of algebraic spaces over $S$.
\begin{enumerate}
\item For every sheaf of $\mathcal{O}_X$-modules $\mathcal{F}$
we have a short exact sequence
$$
0 \to \mathcal{F} \to
j_{U, *}\mathcal{F}|_U \oplus j_{V, *}\mathcal{F}|_V \to
j_{U \times_X V, *}\mathcal{F}|_{U \times_X V} \to 0
$$
\item For any object $E$ of $D(\mathcal{O}_X)$ we have a distinguished
triangle
$$
E \to 
Rj_{U, *}E|_U \oplus Rj_{V, *}E|_V \to
Rj_{U \times_X V, *}E|_{U \times_X V} \to
E[1]
$$
in $D(\mathcal{O}_X)$.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $W$ be an object of $X_\etale$. We claim the sequence
$$
0 \to
\mathcal{F}(W) \to
\mathcal{F}(W \times_X U) \oplus \mathcal{F}(W \times_X V) \to
\mathcal{F}(W \times_X U \times_X V)
$$
is exact and that an element of the last group can locally on $W$
be lifted to the middle one.
By Lemma \ref{lemma-make-more-elementary-distinguished-squares}
the pair $(W \times_X U \subset W, V \times_X W \to W)$ is an elementary
distinguished square. Thus we may assume $W = X$ and it suffices
to prove the same thing for
$$
0 \to
\mathcal{F}(X) \to
\mathcal{F}(U) \oplus \mathcal{F}(V) \to
\mathcal{F}(U \times_X V)
$$
We have seen that
$$
0 \to j_{U \times_X V!}\mathcal{O}_{U \times_X V}
\to j_{U!}\mathcal{O}_U \oplus
j_{V!}\mathcal{O}_V \to
\mathcal{O}_X \to 0
$$
is a exact sequence of $\mathcal{O}_X$-modules in
Lemma \ref{lemma-exact-sequence-lower-shriek} and applying
the right exact functor $\Hom_{\mathcal{O}_X}(- , \mathcal{F})$
gives the sequence above. This also means that the obstruction
to lifting $s \in \mathcal{F}(U \times_X V)$ to
an element of $\mathcal{F}(U) \oplus \mathcal{F}(V)$ lies in
$\Ext^1_{\mathcal{O}_X}(\mathcal{O}_X, \mathcal{F}) =
H^1(X, \mathcal{F})$. By locality of cohomology
(Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-kill-cohomology-class-on-covering})
this obstruction vanishes \'etale locally on $X$ and the proof
of (1) is complete.

\medskip\noindent
Proof of (2).
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $E$
whose terms $\mathcal{I}^n$ are injective objects of
$\textit{Mod}(\mathcal{O}_X)$, see Injectives, Theorem
\ref{injectives-theorem-K-injective-embedding-grothendieck}.
Then $\mathcal{I}^\bullet|U$ is a K-injective complex
(Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-restrict-K-injective-to-open}).
Hence $Rj_{U, *}E|_U$ is represented by $j_{U, *}\mathcal{I}^\bullet|_U$.
Similarly for $V$ and $U \times_X V$. Hence the distinguished triangle
of the lemma is the distinguished triangle associated (by
Derived Categories, Section
\ref{derived-section-canonical-delta-functor} and especially
Lemma \ref{derived-lemma-derived-canonical-delta-functor})
to the short exact sequence of complexes
$$
0 \to
\mathcal{I}^\bullet \to
j_{U, *}\mathcal{I}^\bullet|_U \oplus j_{V, *}\mathcal{I}^\bullet|_V \to
j_{U \times_X V, *}\mathcal{I}^\bullet|_{U \times_X V} \to
0.
$$
This sequence is exact by (1).
\end{proof}

\begin{lemma}
\label{lemma-unbounded-relative-mayer-vietoris}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Let $(U \subset X, V \to X)$ be an elementary distinguished square.
Denote $a = f|_U : U \to Y$, $b = f|_V : V \to Y$, and
$c = f|_{U \times_X V} : U \times_X V \to Y$ the restrictions.
For every object $E$ of $D(\mathcal{O}_X)$ there exists a
distinguished triangle
$$
Rf_*E \to
Ra_*(E|_U) \oplus Rb_*(E|_V) \to
Rc_*(E|_{U \times_X V}) \to
Rf_*E[1]
$$
in $D(\mathcal{O}_Y)$. This triangle is functorial in $E$.
\end{lemma}

\begin{proof}
Choose a K-injective complex $\mathcal{I}^\bullet$
representing $E$. We may assume $\mathcal{I}^n$ is an injective
object of $\textit{Mod}(\mathcal{O}_X)$ for all $n$, see
Injectives, Theorem
\ref{injectives-theorem-K-injective-embedding-grothendieck}.
Then $Rf_*E$ is computed by $f_*\mathcal{I}^\bullet$.
Similarly for $U$, $V$, and $U \cap V$ by
Cohomology on Sites,
Lemma \ref{sites-cohomology-lemma-restrict-K-injective-to-open}.
Hence the distinguished triangle of the lemma is the distinguished
triangle associated (by
Derived Categories, Section
\ref{derived-section-canonical-delta-functor} and especially
Lemma \ref{derived-lemma-derived-canonical-delta-functor})
to the short exact sequence of complexes
$$
0 \to
f_*\mathcal{I}^\bullet \to
a_*\mathcal{I}^\bullet|_U \oplus b_*\mathcal{I}^\bullet|_V \to
c_*\mathcal{I}^\bullet|_{U \times_X V} \to
0.
$$
To see this is a short exact sequence of complexes we argue as
follows. Pick an injective object $\mathcal{I}$ of
$\textit{Mod}(\mathcal{O}_X)$. Apply $f_*$ to the short exact sequence
$$
0 \to \mathcal{I} \to
j_{U, *}\mathcal{I}|_U \oplus j_{V, *}\mathcal{I}|_V \to
j_{U \times_X V, *}\mathcal{I}|_{U \times_X V} \to 0
$$
of Lemma \ref{lemma-exact-sequence-j-star}
and use that $R^1f_*\mathcal{I} = 0$ to get a short exact sequence
$$
0 \to f_*\mathcal{I} \to
f_*j_{U, *}\mathcal{I}|_U \oplus f_*j_{V, *}\mathcal{I}|_V \to
f_*j_{U \times_X V, *}\mathcal{I}|_{U \times_X V} \to 0
$$
The proof is finished by observing that $a_* = f_*j_{U, *}$ and similarly
for $b_*$ and $c_*$.
\end{proof}

\begin{lemma}
\label{lemma-mayer-vietoris-hom}
Let $S$ be a scheme. Let $(U \subset X, V \to X)$ be an elementary
distinguished square of algebraic spaces over $S$.
For objects $E$, $F$ of $D(\mathcal{O}_X)$ we have a
Mayer-Vietoris sequence
$$
\xymatrix{
& \ldots \ar[r] &
\Ext^{-1}(E_{U \times_X V}, F_{U \times_X V}) \ar[lld] \\
\Hom(E, F) \ar[r] &
\Hom(E_U, F_U) \oplus
\Hom(E_V, F_V) \ar[r] &
\Hom(E_{U \times_X V}, F_{U \times_X V})
}
$$
where the subscripts denote restrictions to the relevant opens
and the $\Hom$'s are taken in the relevant derived categories.
\end{lemma}

\begin{proof}
Use the distinguished triangle of
Lemma \ref{lemma-exact-sequence-lower-shriek}
to obtain a long exact sequence of $\Hom$'s
(from Derived Categories, Lemma \ref{derived-lemma-representable-homological})
and use that $\Hom(j_{U!}E|_U, F) = \Hom(E|_U, F|_U)$
by Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-adjoint-lower-shriek-restrict}.
\end{proof}

\begin{lemma}
\label{lemma-unbounded-mayer-vietoris}
Let $S$ be a scheme. Let $(U \subset X, V \to X)$ be an elementary
distinguished square of algebraic spaces over $S$. For an object $E$
of $D(\mathcal{O}_X)$ we have a distinguished triangle
$$
R\Gamma(X, E) \to R\Gamma(U, E) \oplus R\Gamma(V, E) \to
R\Gamma(U \times_X V, E) \to R\Gamma(X, E)[1]
$$
and in particular a long exact cohomology sequence
$$
\ldots \to
H^n(X, E) \to
H^n(U, E) \oplus H^n(V, E) \to
H^n(U \times_X V, E) \to
H^{n + 1}(X, E) \to \ldots
$$
The construction of the distinguished triangle and the
long exact sequence is functorial in $E$.
\end{lemma}

\begin{proof}
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $E$
whose terms $\mathcal{I}^n$ are injective objects of
$\textit{Mod}(\mathcal{O}_X)$, see Injectives, Theorem
\ref{injectives-theorem-K-injective-embedding-grothendieck}.
In the proof of Lemma \ref{lemma-exact-sequence-j-star}
we found a short exact sequence
of complexes
$$
0 \to \mathcal{I}^\bullet \to
j_{U, *}\mathcal{I}^\bullet|_U \oplus j_{V, *}\mathcal{I}^\bullet|_V \to
j_{U \times_X V, *}\mathcal{I}^\bullet|_{U \times_X V} \to 0
$$
Since $H^1(X, \mathcal{I}^n) = 0$, we see that
taking global sections gives an exact sequence of complexes
$$
0 \to \Gamma(X, \mathcal{I}^\bullet) \to
\Gamma(U, \mathcal{I}^\bullet) \oplus
\Gamma(V, \mathcal{I}^\bullet) \to
\Gamma(U \times_X V, \mathcal{I}^\bullet) \to 0
$$
Since these complexes represent
$R\Gamma(X, E)$, $R\Gamma(U, E)$, $R\Gamma(V, E)$, and
$R\Gamma(U \times_X V, E)$ we 
get a distinguished triangle by
Derived Categories, Section
\ref{derived-section-canonical-delta-functor} and especially
Lemma \ref{derived-lemma-derived-canonical-delta-functor}.
\end{proof}

\begin{lemma}
\label{lemma-restrict-lower-shriek}
Let $S$ be a scheme. Let $j : U \to X$ be a \'etale morphism of algebraic
spaces over $S$. Given an \'etale morphism $V \to Y$, set $W = V \times_X U$
and denote $j_W : W \to V$ the projection morphism. Then
$(j_!E)|_V = j_{W!}(E|_W)$ for $E$ in $D(\mathcal{O}_U)$.
\end{lemma}

\begin{proof}
This is true because
$(j_!\mathcal{F})|_V = j_{W!}(\mathcal{F}|_W)$
for an $\mathcal{O}_X$-module $\mathcal{F}$ as follows immediately 
from the construction of the functors $j_!$ and $j_{W!}$, see
Modules on Sites, Lemma \ref{sites-modules-lemma-extension-by-zero}.
\end{proof}

\begin{lemma}
\label{lemma-pushforward-with-support-in-open}
Let $S$ be a scheme. Let $(U \subset X, j : V \to X)$ be an elementary
distinguished square of algebraic spaces over $S$. Set
$T = |X| \setminus |U|$.
\begin{enumerate}
\item If $E$ is an object of $D(\mathcal{O}_X)$ supported on $T$, then
(a) $E \to Rj_*(E|_V)$ and (b) $j_!(E|_V) \to E$ are isomorphisms.
\item If $F$ is an object of $D(\mathcal{O}_V)$ supported on $j^{-1}T$, then
(a) $F \to (j_!F)|_V$, (b) $(Rj_*F)|_V \to F$, and (c)
$j_!F \to Rj_*F$ are isomorphisms.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $E$ be an object of $D(\mathcal{O}_X)$ whose cohomology sheaves are
supported on $T$. Then we see that $E|_U = 0$ and $E|_{U \times_X V} = 0$
as $T$ doesn't meet $U$ and $j^{-1}T$ doesn't meet $U \times_X V$.
Thus (1)(a) follows from Lemma \ref{lemma-exact-sequence-j-star}.
In exactly the same way (1)(b) follows from
Lemma \ref{lemma-exact-sequence-lower-shriek}.

\medskip\noindent
Let $F$ be an object of $D(\mathcal{O}_V)$ whose cohomology sheaves
are supported on $j^{-1}T$. By
Lemma \ref{lemma-restrict-direct-image-open} we have
$(Rj_*F)|_U = Rj_{W, *}(F|_W) = 0$ because $F|_W = 0$ by our assumption.
Similarly $(j_!F)|_U = j_{W!}(F|_W) = 0$ by
Lemma \ref{lemma-restrict-lower-shriek}.
Thus $j_!F$ and $Rj_*F$ are
supported on $T$ and $(j_!F)|_V$ and $(Rj_*F)|_V$ are supported on
$j^{-1}(T)$. To check that the maps (2)(a), (b), (c) are isomorphisms
in the derived category, it suffices to check that these map induce
isomorphisms on stalks of cohomology sheaves at geometric points of $T$
and $j^{-1}(T)$ by
Properties of Spaces, Theorem
\ref{spaces-properties-theorem-exactness-stalks}.
This we may do after replacing $X$ by $V$, $U$ by $U \times_X V$,
$V$ by $V \times_X V$ and $F$ by $F|_{V \times_X V}$ (restriction via
first projection), see
Lemmas \ref{lemma-restrict-direct-image-open},
\ref{lemma-restrict-lower-shriek}, and
\ref{lemma-make-more-elementary-distinguished-squares}.
Since $V \times_X V \to V$ has a section this
reduces (2) to the case that $j : V \to X$ has a section.

\medskip\noindent
Assume $j$ has a section $\sigma : X \to V$.
Set $V' = \sigma(X)$. This is an open subspace of $V$.
Set $U' = j^{-1}(U)$. This is another open subspace of $V$.
Then $(U' \subset V, V' \to V)$ is an elementary distinguished
square. Observe that $F|_{U'} = 0$ and $F|_{V' \cap U'} = 0$
because $F$ is supported on $j^{-1}(T)$. Denote $j' : V' \to V$
the open immersion and $j_{V'} : V' \to X$ the composition
$V' \to V \to X$ which is the inverse of $\sigma$.
Set $F' = \sigma^*F$. The distinguished triangles of
Lemmas \ref{lemma-exact-sequence-lower-shriek} and
\ref{lemma-exact-sequence-j-star} show that
$F = j'_!(F|_{V'})$ and $F = Rj'_*(F|_{V'})$.
It follows that $j_!F = j_!j'_!(F|_{V'}) = j_{V'!}F = F'$
because $j_{V'} : V' \to X$ is an isomorphism and the inverse
of $\sigma$. Similarly, $Rj_*F = Rj_*Rj'_*F = Rj_{V', *}F = F'$.
This proves (2)(c). To prove (2)(a) and (2)(b) it suffices
to show that $F = F'|_V$. This is clear because both $F$ and $F'|_V$
restrict to zero on $U'$ and $U' \cap V'$ and the same object
on $V'$.
\end{proof}

\noindent
We can glue complexes!

\begin{lemma}
\label{lemma-glue}
Let $S$ be a scheme. Let $(U \subset X, V \to X)$ be an elementary
distinguished square of algebraic spaces over $S$. Suppose given
\begin{enumerate}
\item an object $A$ of $D(\mathcal{O}_U)$,
\item an object $B$ of $D(\mathcal{O}_V)$, and
\item an isomorphism $c : A|_{U \times_X V} \to B|_{U \times_X V}$.
\end{enumerate}
Then there exists an object $F$ of $D(\mathcal{O}_X)$
and isomorphisms $f : F|_U \to A$, $g : F|_V \to B$ such
that $c = g|_{U \times_X V} \circ f^{-1}|_{U \times_X V}$.
Moreover, given
\begin{enumerate}
\item an object $E$ of $D(\mathcal{O}_X)$,
\item a morphism $a : A \to E|_U$ of $D(\mathcal{O}_U)$,
\item a morphism $b : B \to E|_V$ of $D(\mathcal{O}_V)$,
\end{enumerate}
such that
$$
a|_{U \times_X V}  = b|_{U \times_X V} \circ c.
$$
Then there exists a morphism $F \to E$ in $D(\mathcal{O}_X)$
whose restriction to $U$ is $a \circ f$
and whose restriction to $V$ is $b \circ g$.
\end{lemma}

\begin{proof}
Denote $j_U$, $j_V$, $j_{U \times_X V}$ the corresponding morphisms towards
$X$. Choose a distinguished triangle
$$
F \to Rj_{U, *}A \oplus Rj_{V, *}B \to
Rj_{U \times_X V, *}(B|_{U \times_X V}) \to F[1]
$$
Here the map $Rj_{V, *}B \to Rj_{U \times_X V, *}(B|_{U \times_X V})$
is the obvious one. The map
$Rj_{U, *}A \to Rj_{U \times_X V, *}(B|_{U \times_X V})$
is the composition of
$Rj_{U, *}A \to Rj_{U \times_X V, *}(A|_{U \times_X V})$
with $Rj_{U \times_X V, *}c$. Restricting to $U$ we obtain
$$
F|_U \to A \oplus (Rj_{V, *}B)|_U \to
(Rj_{U \times_X V, *}(B|_{U \times_X V}))|_U \to F|_U[1]
$$
Denote $j : U \times_X V \to U$. Compatibility of restriction and
total direct image (Lemma \ref{lemma-restrict-direct-image-open})
shows that both $(Rj_{V, *}B)|_U$ and
$(Rj_{U \times_X V, *}(B|_{U \times_X V}))|_U$
are canonically isomorphic to $Rj_*(B|_{U \times_X V})$.
Hence the second arrow of the last displayed equation has
a section, and we conclude that the morphism $F|_U \to A$ is
an isomorphism.

\medskip\noindent
To see that the morphism $F|_V \to B$ is an isomorphism we will use a trick.
Namely, choose a distinguished triangle
$$
F|_V \to B \to B' \to F[1]|_V
$$
in $D(\mathcal{O}_V)$. Since $F|_U \to A$ is an isomorphism, and since
we have the isomorphism $c : A|_{U \times_X V} \to B|_{U \times_X V}$
the restriction of $F|_V \to B$ is an isomorphism over $U \times_X V$.
Thus $B'$ is supported on $j_V^{-1}(T)$ where $T = |X| \setminus |U|$.
On the other hand, there is a morphism of distinguished triangles
$$
\xymatrix{
F \ar[r] \ar[d] &
Rj_{U, *}F|_U \oplus Rj_{V, *}F|_V \ar[r] \ar[d] &
Rj_{U \times_X V, *}F|_{U \times_X V} \ar[r] \ar[d] &
F[1] \ar[d] \\
F \ar[r] &
Rj_{U, *}A \oplus Rj_{V, *}B \ar[r] &
Rj_{U \times_X V, *}(B|_{U \times_X V}) \ar[r] &
F[1]
}
$$
The all of the vertical maps in this diagram are isomorphisms, except
for the map $Rj_{V, *}F|_V \to Rj_{V, *}B$, hence that is an isomorphism too
(Derived Categories, Lemma \ref{derived-lemma-third-isomorphism-triangle}).
This implies that $Rj_{V, *}B' = 0$. Hence $B' = 0$ by
Lemma \ref{lemma-pushforward-with-support-in-open}.

\medskip\noindent
The existence of the morphism $F \to E$ follows
from the Mayer-Vietoris sequence for $\Hom$, see
Lemma \ref{lemma-mayer-vietoris-hom}.
\end{proof}







\section{The coherator}
\label{section-coherator}

\noindent
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
The {\it coherator} is a functor
$$
Q_X :
\textit{Mod}(\mathcal{O}_X)
\longrightarrow
\QCoh(\mathcal{O}_X)
$$
which is right adjoint to the inclusion functor
$\QCoh(\mathcal{O}_X) \to \textit{Mod}(\mathcal{O}_X)$.
It exists for any algebraic space $X$ and moreover the adjunction mapping
$Q_X(\mathcal{F}) \to \mathcal{F}$ is an isomorphism for every
quasi-coherent module $\mathcal{F}$, see
Properties of Spaces, Proposition
\ref{spaces-properties-proposition-coherator}.
Since $Q_X$ is left exact (as a right adjoint) we can consider its
right derived extension
$$
RQ_X :
D(\mathcal{O}_X)
\longrightarrow
D(\QCoh(\mathcal{O}_X)).
$$
Since $Q_X$ is right adjoint to the inclusion functor
$\QCoh(\mathcal{O}_X) \to \textit{Mod}(\mathcal{O}_X)$
we see that $RQ_X$ is right adjoint to the canonical functor
$D(\QCoh(\mathcal{O}_X)) \to D(\mathcal{O}_X)$ by
Derived Categories, Lemma \ref{derived-lemma-derived-adjoint-functors}.

\medskip\noindent
In this section we will study the functor $RQ_X$. In
Section \ref{section-better-coherator}
we will study the (closely related) right adjoint to the inclusion functor
$D_\QCoh(\mathcal{O}_X) \to D(\mathcal{O}_X)$ (when it exists).

\begin{lemma}
\label{lemma-affine-pushforward}
Let $S$ be a scheme. Let $f : X \to Y$ be an affine morphism of
algebraic spaces over $S$. Then $f_*$ defines a derived functor
$f_* : D(\QCoh(\mathcal{O}_X)) \to D(\QCoh(\mathcal{O}_Y))$.
This functor has the property that
$$
\xymatrix{
D(\QCoh(\mathcal{O}_X)) \ar[d]_{f_*} \ar[r] &
D_\QCoh(\mathcal{O}_X) \ar[d]^{Rf_*} \\
D(\QCoh(\mathcal{O}_Y)) \ar[r] &
D_\QCoh(\mathcal{O}_Y)
}
$$
commutes.
\end{lemma}

\begin{proof}
The functor
$f_* : \QCoh(\mathcal{O}_X) \to \QCoh(\mathcal{O}_Y)$
is exact, see
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-affine-vanishing-higher-direct-images}.
Hence $f_*$ defines a derived functor
$f_* : D(\QCoh(\mathcal{O}_X)) \to D(\QCoh(\mathcal{O}_Y))$
by simply applying $f_*$ to any representative complex, see
Derived Categories, Lemma \ref{derived-lemma-right-derived-exact-functor}.
For any complex of $\mathcal{O}_X$-modules
$\mathcal{F}^\bullet$ there is a canonical map
$f_*\mathcal{F}^\bullet \to Rf_*\mathcal{F}^\bullet$.
To finish the proof we show this is a quasi-isomorphism when
$\mathcal{F}^\bullet$ is a complex with each $\mathcal{F}^n$
quasi-coherent. The statement is \'etale local on $Y$ hence we
may assume $Y$ affine. As an affine morphism is representable
we reduce to the case of schemes by the compatibility of
Remark \ref{remark-match-total-direct-images}. The case of schemes is
Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-pushforward}.
\end{proof}

\begin{lemma}
\label{lemma-flat-pushforward-coherator}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic
spaces over $S$. Assume $f$ is quasi-compact, quasi-separated, and flat.
Then, denoting
$$
\Phi : D(\QCoh(\mathcal{O}_X)) \to D(\QCoh(\mathcal{O}_Y))
$$
the right derived functor of
$f_* : \QCoh(\mathcal{O}_X) \to \QCoh(\mathcal{O}_Y)$
we have $RQ_Y \circ Rf_* = \Phi \circ RQ_X$.
\end{lemma}

\begin{proof}
We will prove this by showing that $RQ_Y \circ Rf_*$ and $\Phi \circ RQ_X$
are right adjoint to the same functor
$D(\QCoh(\mathcal{O}_Y)) \to D(\mathcal{O}_X)$.

\medskip\noindent
Since $f$ is quasi-compact and quasi-separated, we see that
$f_*$ preserves quasi-coherence, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}.
Recall that $\QCoh(\mathcal{O}_X)$ is a Grothendieck abelian category
(Properties of Spaces, Proposition
\ref{spaces-properties-proposition-coherator}).
Hence any $K$ in $D(\QCoh(\mathcal{O}_X))$
can be represented by a K-injective complex $\mathcal{I}^\bullet$
of $\QCoh(\mathcal{O}_X)$, see
Injectives, Theorem
\ref{injectives-theorem-K-injective-embedding-grothendieck}.
Then we can define $\Phi(K) = f_*\mathcal{I}^\bullet$.

\medskip\noindent
Since $f$ is flat, the functor $f^*$ is exact. Hence $f^*$ defines
$f^* : D(\mathcal{O}_Y) \to D(\mathcal{O}_X)$ and also
$f^* : D(\QCoh(\mathcal{O}_Y)) \to D(\QCoh(\mathcal{O}_X))$.
The functor $f^* = Lf^* : D(\mathcal{O}_Y) \to D(\mathcal{O}_X)$
is left adjoint to
$Rf_* : D(\mathcal{O}_X) \to D(\mathcal{O}_Y)$,
see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-adjoint}.
Similarly, the functor
$f^* : D(\QCoh(\mathcal{O}_Y)) \to D(\QCoh(\mathcal{O}_X))$
is left adjoint to
$\Phi : D(\QCoh(\mathcal{O}_X)) \to D(\QCoh(\mathcal{O}_Y))$
by Derived Categories, Lemma \ref{derived-lemma-derived-adjoint-functors}.

\medskip\noindent
Let $A$ be an object of $D(\QCoh(\mathcal{O}_Y))$ and
$E$ an object of $D(\mathcal{O}_X)$. Then
\begin{align*}
\Hom_{D(\QCoh(\mathcal{O}_Y))}(A, RQ_Y(Rf_*E))
& =
\Hom_{D(\mathcal{O}_Y)}(A, Rf_*E) \\
& =
\Hom_{D(\mathcal{O}_X)}(f^*A, E) \\
& =
\Hom_{D(\QCoh(\mathcal{O}_X))}(f^*A, RQ_X(E)) \\
& =
\Hom_{D(\QCoh(\mathcal{O}_Y))}(A, \Phi(RQ_X(E)))
\end{align*}
This implies what we want.
\end{proof}

\begin{lemma}
\label{lemma-affine-coherator}
Let $S$ be a scheme. Let $X$ be an affine algebraic space over $S$.
Set $A = \Gamma(X, \mathcal{O}_X)$. Then
\begin{enumerate}
\item $Q_X : \textit{Mod}(\mathcal{O}_X) \to \QCoh(\mathcal{O}_X)$
is the functor
which sends $\mathcal{F}$ to the quasi-coherent $\mathcal{O}_X$-module
associated to the $A$-module $\Gamma(X, \mathcal{F})$,
\item $RQ_X : D(\mathcal{O}_X) \to D(\QCoh(\mathcal{O}_X))$
is the functor which sends $E$ to the complex of quasi-coherent
$\mathcal{O}_X$-modules associated to the object $R\Gamma(X, E)$ of $D(A)$,
\item restricted to $D_\QCoh(\mathcal{O}_X)$ the functor
$RQ_X$ defines a quasi-inverse to (\ref{equation-compare}).
\end{enumerate}
\end{lemma}

\begin{proof}
Let $X_0 = \Spec(A)$ be the affine scheme representing $X$.
Recall that there is a morphism of ringed sites
$\epsilon : X_\etale \to X_{0, Zar}$
which induces equivalences
$$
\xymatrix{
\QCoh(\mathcal{O}_X) \ar@<1ex>[r]^{{\epsilon_*}} &
\QCoh(\mathcal{O}_{X_0}) \ar@<1ex>[l]^{{\epsilon^*}}
}
$$
see Lemma
\ref{lemma-derived-quasi-coherent-small-etale-site}.
Hence we see that $Q_X = \epsilon^* \circ Q_{X_0} \circ \epsilon_*$
by uniqueness of adjoint functors. Hence (1) follows from
the description of $Q_{X_0}$ in
Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-coherator}
and the fact that
$\Gamma(X_0, \epsilon_*\mathcal{F}) = \Gamma(X, \mathcal{F})$.
Part (2) follows from (1) and the fact that the functor
from $A$-modules to quasi-coherent $\mathcal{O}_X$-modules is exact.
The third assertion now follows from the result for schemes
(Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-coherator})
and Lemma
\ref{lemma-derived-quasi-coherent-small-etale-site}.
\end{proof}

\noindent
Next, we prove a criterion for when the functor
$D(\QCoh(\mathcal{O}_X)) \to D_\QCoh(\mathcal{O}_X)$
is an equivalence.

\begin{lemma}
\label{lemma-argument-proves}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Suppose that for every \'etale morphism
$j : V \to W$ with $W \subset X$ quasi-compact open and $V$ affine
the right derived functor
$$
\Phi : D(\QCoh(\mathcal{O}_U)) \to D(\QCoh(\mathcal{O}_W))
$$
of the left exact functor
$j_* : \QCoh(\mathcal{O}_V) \to \QCoh(\mathcal{O}_W)$
fits into a commutative diagram
$$
\xymatrix{
D(\QCoh(\mathcal{O}_V)) \ar[d]_\Phi \ar[r]_{i_V} &
D_\QCoh(\mathcal{O}_V) \ar[d]^{Rj_*} \\
D(\QCoh(\mathcal{O}_W)) \ar[r]^{i_W} &
D_\QCoh(\mathcal{O}_W)
}
$$
Then the functor (\ref{equation-compare})
$$
D(\QCoh(\mathcal{O}_X))
\longrightarrow
D_\QCoh(\mathcal{O}_X)
$$
is an equivalence with quasi-inverse given by $RQ_X$.
\end{lemma}

\begin{proof}
We first use the induction principle to prove $i_X$ is fully faithful.
More precisely, we will use Lemma \ref{lemma-induction-principle-enlarge}.
Let $(U \subset W, V \to W)$ be an elementary distinguished square
with $V$ affine and $U, W$ quasi-compact open in $X$. Assume that
$i_U$ is fully faithful. We have to show that $i_W$ is fully faithful.
We may replace $X$ by $W$, i.e., we may assume $W = X$ (we do this just
to simplify the notation -- observe that the condition in the
statement of the lemma is preserved under this operation).

\medskip\noindent
Suppose that $A, B$ are objects of $D(\QCoh(\mathcal{O}_X))$.
We want to show that
$$
\Hom_{D(\QCoh(\mathcal{O}_X))}(A, B)
\longrightarrow
\Hom_{D(\mathcal{O}_X)}(i_X(A), i_X(B))
$$
is bijective. Let $T = |X| \setminus |U|$.

\medskip\noindent
Assume first $i_X(B)$ is supported on $T$. In this case the map
$$
i_X(B) \to Rj_{V, *}(i_X(B)|_V) = Rj_{V, *}(i_V(B|_V))
$$
is a quasi-isomorphism
(Lemma \ref{lemma-pushforward-with-support-in-open}).
By assumption we have an isomorphism
$i_X(\Phi(B|_V)) \to Rj_{V, *}(i_V(B|_V))$ in $D(\mathcal{O}_X)$.
Moreover, $\Phi$ and ${-}|_V$ are adjoint functors on the derived categories of
quasi-coherent modules (by
Derived Categories, Lemma \ref{derived-lemma-derived-adjoint-functors}).
The adjunction map $B \to \Phi(B|_V)$ becomes an isomorphism
after applying $i_X$, whence is an isomorphism in
$D(\QCoh(\mathcal{O}_X))$.
Hence
\begin{align*}
\Mor_{D(\QCoh(\mathcal{O}_X))}(A, B)
& =
\Mor_{D(\QCoh(\mathcal{O}_X))}(A, \Phi(B|_V)) \\
& =
\Mor_{D(\QCoh(\mathcal{O}_V))}(A|_V, B|_V) \\
& =
\Mor_{D(\mathcal{O}_V)}(i_V(A|_V), i_V(B|_V)) \\
& =
\Mor_{D(\mathcal{O}_X)}(i_X(A), Rj_{V, *}(i_V(B|_V))) \\
& =
\Mor_{D(\mathcal{O}_X)}(i_X(A), i_X(B))
\end{align*}
as desired. Here we have used that $i_V$ is fully faithful
(Lemma \ref{lemma-affine-coherator}).

\medskip\noindent
In general, choose any complex $\mathcal{B}^\bullet$ of quasi-coherent
$\mathcal{O}_X$-modules representing $B$. Next, choose any quasi-isomorphism
$s : \mathcal{B}^\bullet|_U \to \mathcal{C}^\bullet$ of complexes of
quasi-coherent modules on $U$. As $j_U : U \to X$ is
quasi-compact and quasi-separated the functor $j_{U, *}$ transforms
quasi-coherent modules into quasi-coherent modules
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}).
Thus there is a canonical map
$\mathcal{B}^\bullet \to j_{U, *}(\mathcal{B}^\bullet|_U) \to
j_{U, *}\mathcal{C}^\bullet$
of complexes of quasi-coherent modules on $X$.
Set $B'' = j_{U, *}\mathcal{C}^\bullet$ in $D(\QCoh(\mathcal{O}_X))$
and choose a distinguished triangle
$$
B \to B'' \to B' \to B[1]
$$
in $D(\QCoh(\mathcal{O}_X))$. Since the first arrow of the triangle
restricts to an isomorphism over $U$ we see that $B'$ is supported on $T$.
Hence in the diagram
$$
\xymatrix{
\Hom_{D(\QCoh(\mathcal{O}_X))}(A, B'[-1]) \ar[r] \ar[d] &
\Hom_{D(\mathcal{O}_X)}(i_X(A), i_X(B')[-1]) \ar[d] \\
\Hom_{D(\QCoh(\mathcal{O}_X))}(A, B) \ar[r] \ar[d] &
\Hom_{D(\mathcal{O}_X)}(i_X(A), i_X(B)) \ar[d] \\
\Hom_{D(\QCoh(\mathcal{O}_X))}(A, B'') \ar[r] \ar[d] &
\Hom_{D(\mathcal{O}_X)}(i_X(A), i_X(B'')) \ar[d] \\
\Hom_{D(\QCoh(\mathcal{O}_X))}(A, B') \ar[r] &
\Hom_{D(\mathcal{O}_X)}(i_X(A), i_X(B'))
}
$$
we have exact columns and the top and bottom horizontal arrows are
bijective. Finally, choose a complex $\mathcal{A}^\bullet$
of quasi-coherent modules representing $A$.

\medskip\noindent
Let $\alpha : i_X(A) \to i_X(B)$ be a morphism between
in $D(\mathcal{O}_X)$. The restriction $\alpha|_U$ comes from a
morphism in $D(\QCoh(\mathcal{O}_U))$ as $i_U$ is fully faithful.
Hence there exists a choice of
$s : \mathcal{B}^\bullet|_U \to \mathcal{C}^\bullet$ as above
such that $\alpha|_U$ is represented by an actual map of complexes
$\mathcal{A}^\bullet|_U \to \mathcal{C}^\bullet$.
This corresponds to a map of complexes
$\mathcal{A} \to j_{U, *}\mathcal{C}^\bullet$.
In other words, the image of $\alpha$ in
$\Hom_{D(\mathcal{O}_X)}(i_X(A), i_X(B''))$ comes from
an element of $\Hom_{D(\QCoh(\mathcal{O}_X))}(A, B'')$.
A diagram chase then shows that $\alpha$ comes from a morphism
$A \to B$ in $D(\QCoh(\mathcal{O}_X))$. Finally, suppose
that $a : A \to B$ is a morphism of $D(\QCoh(\mathcal{O}_X))$
which becomes zero in $D(\mathcal{O}_X)$. After choosing $\mathcal{B}^\bullet$
suitably, we may assume $a$ is represented by a morphism of complexes
$a^\bullet : \mathcal{A}^\bullet \to \mathcal{B}^\bullet$.
Since $i_U$ is fully faithul the restriction $a^\bullet|_U$ is zero
in $D(\QCoh(\mathcal{O}_U))$. Thus we can choose $s$
such that
$s \circ a^\bullet|_U : \mathcal{A}^\bullet|_U \to \mathcal{C}^\bullet$
is homotopic to zero. Applying the functor $j_{U, *}$ we conclude that
$\mathcal{A}^\bullet \to j_{U, *}\mathcal{C}^\bullet$ is homotopic
to zero. Thus $a$ maps to zero in
$\Hom_{D(\QCoh(\mathcal{O}_X))}(A, B'')$.
Thus we may assume that $a$ is the image of an element
of $b \in \Hom_{D(\QCoh(\mathcal{O}_X))}(A, B'[-1])$.
The image of $b$ in $\Hom_{D(\mathcal{O}_X)}(i_X(A), i_X(B')[-1])$
comes from a $\gamma \in \Hom_{D(\mathcal{O}_X)}(A, B''[-1])$
(as $a$ maps to zero in the group on the right). Since we've
seen above the horizontal arrows are surjective, we see
that $\gamma$ comes from a $c$ in
$\Hom_{D(\QCoh(\mathcal{O}_X))}(A, B''[-1])$
which implies $a = 0$ as desired.

\medskip\noindent
At this point we know that $i_X$ is fully faithful for our original $X$.
Since $RQ_X$ is its right adjoint, we see that
$RQ_X \circ i_X = \text{id}$ (Categories, Lemma
\ref{categories-lemma-adjoint-fully-faithful}).
To finish the proof we show that for any
$E$ in $D_\QCoh(\mathcal{O}_X)$ the map
$i_X(RQ_X(E)) \to E$ is an isomorphism. Choose a distinguished triangle
$$
i_X(RQ_X(E)) \to E \to E' \to i_X(RQ_X(E))[1]
$$
in $D_\QCoh(\mathcal{O}_X)$. A formal argument using the
above shows that $i_X(RQ_X(E')) = 0$. Thus it suffices to prove that
for $E \in D_\QCoh(\mathcal{O}_X)$ the condition
$i_X(RQ_X(E)) = 0$ implies that $E = 0$. Consider an \'etale morphism
$j : V \to X$ with $V$ affine. By
Lemmas \ref{lemma-affine-coherator} and
\ref{lemma-flat-pushforward-coherator}
and our assumption we have
$$
Rj_*(E|_V) = Rj_*(i_V(RQ_V(E|_V))) = i_X(\Phi(RQ_V(E|_V))) =
i_X(RQ_X(Rj_*(E|_V)))
$$
Choose a distinguished triangle
$$
E \to Rj_*(E|_V) \to E' \to E[1]
$$
Apply $RQ_X$ to get a distinguished triangle
$$
0 \to RQ_X(Rj_*(E|_V)) \to RQ_X(E') \to 0[1]
$$
in other words the map in the middle is an isomorphism.
Combined with the string of equalities above we find
that our first distinguished triangle becomes a distinguished triangle
$$
E \to i_X(RQ_X(E')) \to E' \to E[1]
$$
where the middle morphism is the adjunction map. However, the composition
$E \to E'$ is zero, hence $E \to i_X(RQ_X(E'))$ is zero by adjunction!
Since this morphism is isomorphic to the morphism
$E \to Rj_*(E|_V)$ adjoint to $\text{id} : E|_V \to E|_V$ we
conclude that $E|_V$ is zero. Since this holds for all
affine $V$ \'etale over $X$ we conclude $E$ is zero as desired.
\end{proof}

\begin{proposition}
\label{proposition-quasi-compact-affine-diagonal}
Let $S$ be a scheme. Let $X$ be a quasi-compact algebraic space over $S$
with affine diagonal over $\mathbf{Z}$ (as in Properties of Spaces, Definition
\ref{spaces-properties-definition-separated}). Then the functor
(\ref{equation-compare})
$$
D(\QCoh(\mathcal{O}_X))
\longrightarrow
D_\QCoh(\mathcal{O}_X)
$$
is an equivalence with quasi-inverse given by $RQ_X$.
\end{proposition}

\begin{proof}
Let $V \to W$ be an \'etale morphism with $V$ affine and $W$ a
quasi-compact open subspace of $X$. Then 
the morphism $V \to W$ is affine as $W$ has affine diagonal over $\mathbf{Z}$
and $V$ is affine
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-affine-permanence}).
Lemma \ref{lemma-affine-pushforward} then guarantees that
the assumption of Lemma \ref{lemma-argument-proves} holds.
Hence we conclude.
\end{proof}

\begin{lemma}
\label{lemma-direct-image-coherator}
Let $S$ be a scheme and let $f : X \to Y$ be a morphism of algebraic
spaces over $S$. Assume $X$ and $Y$ are quasi-compact and have affine diagonal
over $\mathbf{Z}$ (as in Properties of Spaces, Definition
\ref{spaces-properties-definition-separated}). Then, denoting
$$
\Phi : D(\QCoh(\mathcal{O}_X)) \to D(\QCoh(\mathcal{O}_Y))
$$
the right derived functor of
$f_* : \QCoh(\mathcal{O}_X) \to \QCoh(\mathcal{O}_Y)$
the diagram
$$
\xymatrix{
D(\QCoh(\mathcal{O}_X)) \ar[d]_\Phi \ar[r] &
D_\QCoh(\mathcal{O}_X) \ar[d]^{Rf_*} \\
D(\QCoh(\mathcal{O}_Y)) \ar[r] &
D_\QCoh(\mathcal{O}_Y)
}
$$
is commutative.
\end{lemma}

\begin{proof}
Observe that the horizontal arrows in the diagram are
equivalences of categories by
Proposition \ref{proposition-quasi-compact-affine-diagonal}.
Hence we can identify these categories (and similarly for
other quasi-compact algebraic spaces with affine diagonal)
and then the statement of the lemma is that the canonical map
$\Phi(K) \to Rf_*(K)$ is an isomorphism for all $K$ in
$D(\QCoh(\mathcal{O}_X))$. Note that if $K_1 \to K_2 \to K_3 \to K_1[1]$
is a distinguished triangle in $D(\QCoh(\mathcal{O}_X))$ and
the statement is true for two-out-of-three, then it is true
for the third.

\medskip\noindent
Let $\mathcal{B} \subset \Ob(X_{spaces, \etale})$ be the set of
objects which are quasi-compact and have affine diagonal.
For $U \in \mathcal{B}$ and any morphism $g : U \to Z$
where $Z$ is a quasi-compact algebraic space over $S$ with
affine diagonal, denote
$$
\Phi_g : D(\QCoh(\mathcal{O}_U)) \to D(\QCoh(\mathcal{O}_Z))
$$
the derived extension of $g_*$. Let
$P(U) =$ ``for any $K$ in $D(\QCoh(\mathcal{O}_U))$
and any $g : U \to Z$ as above the map $\Phi_g(K) \to Rg_*K$
is an isomorphism''.
By Remark \ref{remark-how-to} conditions (1), (2), and (3)(a) of
Lemma \ref{lemma-induction-principle-separated} hold and we are
left with proving (3)(b) and (4).

\medskip\noindent
Checking condition (3)(b). Let $U$ be an affine scheme \'etale
over $X$. Let $g : U \to Z$ be as above. Since the diagonal of $Z$
is affine the morphism $g : U \to Z$
is affine (Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-affine-permanence}).
Hence $P(U)$ holds by Lemma \ref{lemma-affine-pushforward}.

\medskip\noindent
Checking condition (4).
Let $(U \subset W, V \to W)$ be an elementary distinguished square
in $X_{spaces, \etale}$ with $U, W, V$ in $\mathcal{B}$ and $V$ affine.
Assume that $P$ holds for $U$, $V$, and $U \times_W V$.
We have to show that $P$ holds for $W$. Let $g : W \to Z$
be a morphism to a quasi-compact algebraic space with affine diagonal.
Let $K$ be an object of $D(\QCoh(\mathcal{O}_W))$.
Consider the distinguished triangle
$$
K \to Rj_{U, *}K|_U \oplus Rj_{V, *}K|_V \to
Rj_{U \times_W V, *}K|_{U \times_W V} \to K[1]
$$
in $D(\mathcal{O}_W)$. By the two-out-of-three property mentioned
above, it suffices to show that $\Phi_g(Rj_{U, *}K|_U) \to Rg_*(Rj_{U, *}K|_U)$
is an isomorphism and similarly for $V$ and $U \times_W V$.
This is discussed in the next paragraph.

\medskip\noindent
Let $j : U \to W$ be a morphism $X_{spaces, \etale}$ with
$U, W$ in $\mathcal{B}$ and $P$ holds for $U$. Let $g : W \to Z$
be a morphism to a quasi-compact algebraic space with affine diagonal.
To finish the proof we have to show that
$\Phi_g(Rj_*K) \to Rg_*(Rj_*K)$
is an isomorphism for any $K$ in $D(\QCoh(\mathcal{O}_U))$.
Let $\mathcal{I}^\bullet$ be a K-injective complex in $\QCoh(\mathcal{O}_U)$
representing $K$.
From $P(U)$ applied to $j$ we see that
$j_*\mathcal{I}^\bullet$ represents $Rj_*K$.
Since $j_* : \QCoh(\mathcal{O}_U) \to \QCoh(\mathcal{O}_X)$
has an exact left adjoint
$j^* : \QCoh(\mathcal{O}_X) \to \QCoh(\mathcal{O}_U)$
we see that $j_*\mathcal{I}^\bullet$ is a K-injective complex
in $\QCoh(\mathcal{O}_W)$, see
Derived Categories, Lemma \ref{derived-lemma-adjoint-preserve-K-injectives}.
Hence $\Phi_g(Rj_*K)$ is represented by
$g_*j_*\mathcal{I}^\bullet = (g \circ j)_*\mathcal{I}^\bullet$.
By $P(U)$ applied to $g \circ j$ we see that this represents
$R_{g \circ j, *}(K) = Rg_*(Rj_*K)$. This finishes the proof.
\end{proof}









\section{The coherator for Noetherian spaces}
\label{section-coherator-Noetherian}

\noindent
We need a little bit more about injective modules to treat the case
of a Noetherian algebraic space.

\begin{lemma}
\label{lemma-affine-injective-colimit-direct-sum-pushforwards-artin}
Let $S$ be a Noetherian affine scheme. Every injective object of
$\QCoh(\mathcal{O}_S)$ is a filtered colimit $\colim_i \mathcal{F}_i$
of quasi-coherent sheaves of the form
$$
\mathcal{F}_i = (Z_i \to S)_*\mathcal{G}_i
$$
where $Z_i$ is the spectrum of an Artinian ring and $\mathcal{G}_i$
is a coherent module on $Z_i$.
\end{lemma}

\begin{proof}
Let $S = \Spec(A)$. Let $\mathcal{J}$ be an injective object of
$\QCoh(\mathcal{O}_S)$. Since $\QCoh(\mathcal{O}_S)$ is
equivalent to the category of $A$-modules we see that $\mathcal{J}$
is equal to $\widetilde{J}$ for some injective $A$-module $J$.
By Dualizing Complexes, Proposition
\ref{dualizing-proposition-structure-injectives-noetherian}
we can write $J = \bigoplus E_\alpha$ with $E_\alpha$ indecomposable
and therefore isomorphic to the injective hull of a reside field
at a point. Thus (because finite disjoint unions of Artinian schemes
are Artinian) we may assume that $J$ is the injective hull
of $\kappa(\mathfrak p)$ for some prime $\mathfrak p$ of $A$.
Then $J = \bigcup J[\mathfrak p^n]$ where $J[\mathfrak p^n]$ is
the injective hull of $\kappa(\mathfrak p)$ over
$A_\mathfrak/\mathfrak p^nA_\mathfrak p$, see
Dualizing Complexes, Lemma \ref{dualizing-lemma-union-artinian}.
Thus $\widetilde{J}$ is the colimit of the sheaves
$(Z_n \to X)_*\mathcal{G}_n$ where
$Z_n = \Spec(A_\mathfrak p/\mathfrak p^nA_\mathfrak p)$ and
$\mathfrak G_n$ the coherent sheaf associated to the
finite $A_\mathfrak/\mathfrak p^nA_\mathfrak p$-module $J[\mathfrak p^n]$.
Finiteness follows from
Dualizing Complexes, Lemma \ref{dualizing-lemma-finite}.
\end{proof}

\begin{lemma}
\label{lemma-injective-colimit-direct-sum-pushforwards-artin}
Let $S$ be an affine scheme. Let $X$ be a Noetherian algebraic space
over $S$. Every injective object of $\QCoh(\mathcal{O}_X)$ is
a direct summand of a filtered colimit $\colim_i \mathcal{F}_i$
of quasi-coherent sheaves of the form
$$
\mathcal{F}_i = (Z_i \to X)_*\mathcal{G}_i
$$
where $Z_i$ is the spectrum of an Artinian ring and $\mathcal{G}_i$
is a coherent module on $Z_i$.
\end{lemma}

\begin{proof}
Choose an affine scheme $U$ and a surjective \'etale morphism
$j : U \to X$ (Properties of Spaces, Lemma
\ref{spaces-properties-lemma-quasi-compact-affine-cover}).
Then $U$ is a Noetherian affine scheme. Choose an injective object
$\mathcal{J}'$ of $\QCoh(\mathcal{O}_U)$ such that there
exists an injection $\mathcal{J}|_U \to \mathcal{J}'$. Then
$$
\mathcal{J} \to j_*\mathcal{J}'
$$
is an injective morphism in $\QCoh(\mathcal{O}_X)$,
hence identifies $\mathcal{J}$ as a direct summand of $j_*\mathcal{J}'$.
Thus the result follows from the corresponding result for
$\mathcal{J}'$ proved in
Lemma \ref{lemma-affine-injective-colimit-direct-sum-pushforwards-artin}.
\end{proof}

\begin{lemma}
\label{lemma-flat-pullback-injective-quasi-coherent}
Let $S$ be a scheme. Let $f : X \to Y$ be a flat, quasi-compact, and
quasi-separated morphism of algebraic spaces over $S$. If
$\mathcal{J}$ is an injective object of $\QCoh(\mathcal{O}_X)$,
then $f_*\mathcal{J}$ is an injective object of
$\QCoh(\mathcal{O}_Y)$.
\end{lemma}

\begin{proof}
Since $f$ is quasi-compact and quasi-separated, the functor
$f_*$ transforms quasi-coherent sheaves into quasi-coherent sheaves
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}).
The functor $f^*$ is a left adjoint to $f_*$ which
transforms injections into injections.
Hence the result follows from
Homology, Lemma \ref{homology-lemma-adjoint-preserve-injectives}
\end{proof}

\begin{lemma}
\label{lemma-injective-pushforward}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$. If
$\mathcal{J}$ is an injective object of $\QCoh(\mathcal{O}_X)$,
then
\begin{enumerate}
\item $H^p(U, \mathcal{J}|_U) = 0$ for $p > 0$ and for
every quasi-compact and quasi-separated algebraic space $U$ \'etale over $X$,
\item for any morphism $f : X \to Y$ of algebraic spaces over $S$
with $Y$ quasi-separated we have $R^pf_*\mathcal{J} = 0$ for $p > 0$.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). Write $\mathcal{J}$ as a direct summand of
$\colim \mathcal{F}_i$ with $\mathcal{F}_i = (Z_i \to X)_*\mathcal{G}_i$
as in Lemma \ref{lemma-injective-colimit-direct-sum-pushforwards-artin}.
It is clear that it suffices to prove the vanishing for
$\colim \mathcal{F}_i$. Since pullback commutes with colimits
and since $U$ is quasi-compact and quasi-separated, it suffices
to prove $H^p(U, \mathcal{F}_i|_U) = 0$ for $p > 0$, see
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-colimits}.
Observe that $Z_i \to X$ is an affine morphism, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-Artinian-affine}.
Thus
$$
\mathcal{F}_i|_U = (Z_i \times_X U \to U)_*\mathcal{G}'_i =
R(Z_i \times_X U \to U)_*\mathcal{G}'_i
$$
where $\mathcal{G}'_i$ is the pullback of $\mathcal{G}_i$
to $Z_i \times_X U$, see
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-affine-base-change}.
Since $Z_i \times_X U$ is affine we conclude that
$\mathcal{G}'_i$ has no higher cohomology on $Z_i \times_X U$.
By the Leray spectral sequence we conclude the same
thing is true for $\mathcal{F}_i|_U$ (Cohomology on Sites,
Lemma \ref{sites-cohomology-lemma-apply-Leray}).

\medskip\noindent
Proof of (2). Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Let $V \to Y$ be an \'etale morphism with $V$ affine.
Then $V \times_Y X \to X$ is an \'etale morphism and
$V \times_Y X$ is a quasi-compact and quasi-separated algebraic
space \'etale over $X$ (details omitted). Hence
$H^p(V \times_Y X, \mathcal{J})$ is zero by part (1).
Since $R^pf_*\mathcal{J}$ is the sheaf associated to the presheaf
$V \mapsto H^p(V \times_Y X, \mathcal{J})$ the result is proved.
\end{proof}

\begin{lemma}
\label{lemma-Noetherian-pushforward}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of Noetherian algebraic spaces over $S$.
Then $f_*$ on quasi-coherent sheaves has a right derived
extension
$\Phi : D(\QCoh(\mathcal{O}_X)) \to D(\QCoh(\mathcal{O}_Y))$
such that the diagram
$$
\xymatrix{
D(\QCoh(\mathcal{O}_X)) \ar[d]_{\Phi} \ar[r] &
D_\QCoh(\mathcal{O}_X) \ar[d]^{Rf_*} \\
D(\QCoh(\mathcal{O}_Y)) \ar[r] &
D_\QCoh(\mathcal{O}_Y)
}
$$
commutes.
\end{lemma}

\begin{proof}
Since $X$ and $Y$ are Noetherian the morphism is quasi-compact
and quasi-separated (see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-quasi-separated-permanence}).
Thus $f_*$ preserve quasi-coherence, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}.
Next, let $K$ be an object of $D(\QCoh(\mathcal{O}_X))$.
Since $\QCoh(\mathcal{O}_X)$ is a Grothendieck abelian category
(Properties of Spaces, Proposition
\ref{spaces-properties-proposition-coherator}), we can
represent $K$ by a K-injective complex $\mathcal{I}^\bullet$
such that each $\mathcal{I}^n$ is an injective object of
$\QCoh(\mathcal{O}_X)$, see
Injectives, Theorem
\ref{injectives-theorem-K-injective-embedding-grothendieck}.
Thus we see that the functor $\Phi$ is defined by setting
$$
\Phi(K) = f_*\mathcal{I}^\bullet
$$
where the right hand side is viewed as an object of
$D(\QCoh(\mathcal{O}_Y))$. To finish the proof of the lemma
it suffices to show that the canonical map
$$
f_*\mathcal{I}^\bullet \longrightarrow Rf_*\mathcal{I}^\bullet
$$
is an isomorphism in $D(\mathcal{O}_Y)$. To see this it suffices to
prove the map induces an isomorphism on cohomology sheaves. Pick any
$m \in \mathbf{Z}$. Let $N = N(X, Y, f)$ be as in
Lemma \ref{lemma-quasi-coherence-direct-image}.
Consider the short exact sequence
$$
0 \to \sigma_{\geq m - N - 1}\mathcal{I}^\bullet \to
\mathcal{I}^\bullet \to \sigma_{\leq m - N - 2}\mathcal{I}^\bullet \to 0
$$
of complexes of quasi-coherent sheaves on $X$. By
Lemma \ref{lemma-quasi-coherence-direct-image}
we see that the cohomology sheaves of
$Rf_*\sigma_{\leq m - N - 2}\mathcal{I}^\bullet$
are zero in degrees $\geq m - 1$. Thus we see that
$R^mf_*\mathcal{I}^\bullet$ is isomorphic to
$R^mf_*\sigma_{\geq m - N - 1}\mathcal{I}^\bullet$.
In other words, we may assume that $\mathcal{I}^\bullet$
is a bounded below complex of injective objects of
$\QCoh(\mathcal{O}_X)$.
This case follows from Leray's acyclicity lemma
(Derived Categories, Lemma \ref{derived-lemma-leray-acyclicity})
with required vanishing because of Lemma \ref{lemma-injective-pushforward}.
\end{proof}

\begin{proposition}
\label{proposition-Noetherian}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$.
Then the functor (\ref{equation-compare})
$$
D(\QCoh(\mathcal{O}_X))
\longrightarrow
D_\QCoh(\mathcal{O}_X)
$$
is an equivalence with quasi-inverse given by $RQ_X$.
\end{proposition}

\begin{proof}
Follows immediately from Lemmas \ref{lemma-Noetherian-pushforward} and
\ref{lemma-argument-proves}.
\end{proof}













\section{Pseudo-coherent and perfect complexes}
\label{section-spell-out}

\noindent
In this section we study the general notions defined in
Cohomology on Sites, Sections
\ref{sites-cohomology-section-strictly-perfect},
\ref{sites-cohomology-section-pseudo-coherent},
\ref{sites-cohomology-section-tor}, and
\ref{sites-cohomology-section-perfect}
for the \'etale site of an algebraic space. In particular we
match this with what happens for schemes.

\medskip\noindent
First we compare the notion of a pseudo-coherent complex on a
scheme and on its associated small \'etale site.

\begin{lemma}
\label{lemma-descend-finite-type}
Let $X$ be a scheme. Let $\mathcal{F}$ be an $\mathcal{O}_X$-module.
The following are equivalent
\begin{enumerate}
\item $\mathcal{F}$ is of finite type as an $\mathcal{O}_X$-module, and
\item $\epsilon^*\mathcal{F}$ is of finite type as an
$\mathcal{O}_\etale$-module on the small \'etale site of $X$.
\end{enumerate}
Here $\epsilon$ is as in (\ref{equation-epsilon}).
\end{lemma}

\begin{proof}
The implication (1) $\Rightarrow$ (2) is a general fact, see
Modules on Sites, Lemma \ref{sites-modules-lemma-local-pullback}.
Assume (2). By assumption there exists an \'etale covering
$\{f_i : X_i \to X\}$ such that
$\epsilon^*\mathcal{F}|_{(X_i)_\etale}$ is generated by
finitely many sections. Let $x \in X$. We will show that $\mathcal{F}$
is generated by finitely many sections in a neighbourhood of $x$.
Say $x$ is in the image of $X_i \to X$ and denote $X' = X_i$. Let
$s_1, \ldots, s_n \in
\Gamma(X', \epsilon^*\mathcal{F}|_{X'_\etale})$
be generating sections. As
$\epsilon^*\mathcal{F} =
\epsilon^{-1}\mathcal{F} \otimes_{\epsilon^{-1}\mathcal{O}_X}
\mathcal{O}_\etale$
we can find an \'etale morphism $X'' \to X'$ such that $x$ is
in the image of $X' \to X$ and such that
$s_i|_{X''} = \sum s_{ij} \otimes a_{ij}$ for some sections
$s_{ij} \in \epsilon^{-1}\mathcal{F}(X'')$ and
$a_{ij} \in \mathcal{O}_\etale(X'')$. Denote $U \subset X$ the image
of $X'' \to X$. This is an open subscheme as $f'' : X'' \to X$ is \'etale
(Morphisms, Lemma \ref{morphisms-lemma-etale-open}). After possibly
shrinking $X''$ more we may assume $s_{ij}$ come from elements
$t_{ij} \in \mathcal{F}(U)$ as follows from the construction of
the inverse image functor $\epsilon^{-1}$. Now we claim that
$t_{ij}$ generate $\mathcal{F}|_U$ which finishes the proof
of the lemma. Namely, the corresponding map
$\mathcal{O}_U^{\oplus N} \to \mathcal{F}|_U$ has the property
that its pullback by $f''$ to $X''$ is surjective. Since $f'' : X'' \to U$
is a surjective flat morphism of schemes, this implies that
$\mathcal{O}_U^{\oplus N} \to \mathcal{F}|_U$ is surjective by
looking at stalks and using that
$\mathcal{O}_{U, f''(z)} \to \mathcal{O}_{X'', z}$
is faithfully flat for all $z \in X''$.
\end{proof}

\noindent
In the situation above the morphism of sites $\epsilon$ is flat
hence defines a pullback on complexes of modules.

\begin{lemma}
\label{lemma-descend-pseudo-coherent}
Let $X$ be a scheme. Let $E$ be an object of $D(\mathcal{O}_X)$.
The following are equivalent
\begin{enumerate}
\item $E$ is $m$-pseudo-coherent, and
\item $\epsilon^*E$ is $m$-pseudo-coherent on the small \'etale site of $X$.
\end{enumerate}
Here $\epsilon$ is as in (\ref{equation-epsilon}).
\end{lemma}

\begin{proof}
The implication (1) $\Rightarrow$ (2) is a general fact, see
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-pseudo-coherent-pullback}.
Assume $\epsilon^*E$ is $m$-pseudo-coherent.
We will use without further mention that $\epsilon^*$ is
an exact functor and that therefore
$$
\epsilon^*H^i(E) = H^i(\epsilon^*E).
$$
To show that $E$ is $m$-pseudo-coherent we may work locally on $X$,
hence we may assume that $X$ is quasi-compact (for example affine).
Since $X$ is quasi-compact every \'etale covering $\{U_i \to X\}$
has a finite refinement. Thus we see that $\epsilon^*E$ is
an object of $D^{-}(\mathcal{O}_\etale)$, see
comments following
Cohomology on Sites, Definition
\ref{sites-cohomology-definition-pseudo-coherent}.
By Lemma \ref{lemma-epsilon-flat} it follows that $E$ is an object of
$D^-(\mathcal{O}_X)$.

\medskip\noindent
Let $n \in \mathbf{Z}$ be the largest integer such that
$H^n(E)$ is nonzero; then $n$ is also the largest integer
such that $H^n(\epsilon^*E)$ is nonzero.
We will prove the lemma by induction on $n - m$.
If $n < m$, then the lemma is clearly true.
If $n \geq m$, then $H^n(\epsilon^*E)$ is a finite
$\mathcal{O}_\etale$-module, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-finite-cohomology}.
Hence $H^n(E)$ is a finite $\mathcal{O}_X$-module, see
Lemma \ref{lemma-descend-finite-type}.
After replacing $X$ by the members of an open covering, we may
assume there exists a surjection $\mathcal{O}_X^{\oplus t} \to H^n(E)$.
We may locally on $X$ lift this to a map of complexes
$\alpha : \mathcal{O}_X^{\oplus t}[-n] \to E$ (details omitted).
Choose a distinguished triangle
$$
\mathcal{O}_X^{\oplus t}[-n] \to E \to C \to \mathcal{O}_X^{\oplus t}[-n + 1]
$$
Then $C$ has vanishing cohomology in degrees $\geq n$. On the other hand, the
complex $\epsilon^*C$ is $m$-pseudo-coherent, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-cone-pseudo-coherent}.
Hence by induction we see that $C$ is $m$-pseudo-coherent. Applying
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-cone-pseudo-coherent}
once more we conclude.
\end{proof}

\begin{lemma}
\label{lemma-descend-tor-amplitude}
Let $X$ be a scheme. Let $E$ be an object of $D(\mathcal{O}_X)$.
Then
\begin{enumerate}
\item $E$ has tor amplitude in $[a, b]$ if and only if
$\epsilon^*E$ has tor amplitude in $[a, b]$.
\item $E$ has finite tor dimension if and only if $\epsilon^*E$ has finite
tor dimension.
\end{enumerate}
Here $\epsilon$ is as in (\ref{equation-epsilon}).
\end{lemma}

\begin{proof}
The easy implication follows from
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-tor-amplitude-pullback}.
For the converse, assume that $\epsilon^*E$ has tor amplitude in $[a, b]$.
Let $\mathcal{F}$ be an $\mathcal{O}_X$-module. As $\epsilon$ is a flat
morphism of ringed sites (Lemma \ref{lemma-epsilon-flat})
we have
$$
\epsilon^*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{F})
=
\epsilon^*E
\otimes^\mathbf{L}_{\mathcal{O}_\etale}
\epsilon^*\mathcal{F}
$$
Thus the (assumed) vanishing of cohomology sheaves on the right hand side
implies the desired vanishing of the cohomology sheaves of
$E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{F}$ via
Lemma \ref{lemma-epsilon-flat}.
\end{proof}

\begin{lemma}
\label{lemma-tor-dimension-rel}
Let $f : X \to Y$ be a morphism of schemes. Let $E$ be an object
of $D(\mathcal{O}_X)$. Then
\begin{enumerate}
\item $E$ as an object of $D(f^{-1}\mathcal{O}_Y)$ has tor amplitude in
$[a, b]$ if and only if $\epsilon^*E$ has tor amplitude in $[a, b]$
as an object of $D(f_{small}^{-1}\mathcal{O}_{Y_\etale})$.
\item $E$ locally has finite tor dimension as an object of
$D(f^{-1}\mathcal{O}_Y)$ if and only if $\epsilon^*E$
locally has finite tor dimension as an object of
$D(f_{small}^{-1}\mathcal{O}_{Y_\etale})$.
\end{enumerate}
Here $\epsilon$ is as in (\ref{equation-epsilon}).
\end{lemma}

\begin{proof}
The easy direction in (1) follows from Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-tor-amplitude-pullback}.
Let $x \in X$ be a point and let $\overline{x}$ be a geometric
point lying over $x$. Let $y = f(x)$ and denote $\overline{y}$
the geometric point of $Y$ coming from $\overline{x}$.
Then $(f^{-1}\mathcal{O}_Y)_x = \mathcal{O}_{Y, y}$
(Sheaves, Lemma \ref{sheaves-lemma-stalk-pullback})
and
$$
(f_{small}^{-1}\mathcal{O}_{Y_\etale})_{\overline{x}} =
\mathcal{O}_{Y_\etale, \overline{y}} =
\mathcal{O}_{Y, y}^{sh}
$$
is the strict henselization
(by \'Etale Cohomology, Lemmas \ref{etale-cohomology-lemma-stalk-pullback}
and \ref{etale-cohomology-lemma-describe-etale-local-ring}).
Since the stalk of $\mathcal{O}_{X_\etale}$ at $X$ is
$\mathcal{O}_{X, x}^{sh}$ we obtain
$$
(\epsilon^*E)_{\overline{x}} =
E_x \otimes_{\mathcal{O}_{X, x}}^\mathbf{L} \mathcal{O}_{X, x}^{sh}
$$
by transitivity of pullbacks. If $\epsilon^*E$ has tor amplitude
in $[a, b]$ as a complex of $f_{small}^{-1}\mathcal{O}_{Y_\etale}$-modules,
then $(\epsilon^*E)_{\overline{x}}$ has tor amplitude in $[a, b]$
as a complex of $\mathcal{O}_{Y, y}^{sh}$-modules
(because taking stalks is a pullback and lemma cited above). By
More on Flatness, Lemma \ref{flat-lemma-tor-amplitude-up-down-henselization}
we find the tor amplitude of
$(\epsilon^*E)_{\overline{x}}$
as a complex of $\mathcal{O}_{Y, y}$-modules is in $[a, b]$.
Since $\mathcal{O}_{X, x} \to \mathcal{O}_{X, x}^{sh}$ is faithfully
flat (More on Algebra, Lemma
\ref{more-algebra-lemma-dumb-properties-henselization}) and since
$(\epsilon^*E)_{\overline{x}} =
E_x \otimes_{\mathcal{O}_{X, x}}^\mathbf{L} \mathcal{O}_{X, x}^{sh}$
we may apply
More on Algebra, Lemma \ref{more-algebra-lemma-no-change-tor-amplitude}
to conclude the tor amplitude of $E_x$ as a complex of
$\mathcal{O}_{Y, y}$-modules is in $[a, b]$.
By Cohomology, Lemma \ref{cohomology-lemma-tor-amplitude-stalk}
we conclude that $E$ as an object of $D(f^{-1}\mathcal{O}_Y)$
has tor amplitude in $[a, b]$. This gives the reverse implication in (1).
Part (2) follows formally from (1).
\end{proof}

\begin{lemma}
\label{lemma-descend-perfect}
Let $X$ be a scheme. Let $E$ be an object of $D(\mathcal{O}_X)$.
Then $E$ is a perfect object of $D(\mathcal{O}_X)$ if and only if
$\epsilon^*E$ is a perfect object of $D(\mathcal{O}_\etale)$.
Here $\epsilon$ is as in (\ref{equation-epsilon}).
\end{lemma}

\begin{proof}
The easy implication follows from the general result contained in
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-perfect-pullback}.
For the converse, we can use the equivalence of
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-perfect}
and the corresponding results for pseudo-coherent and complexes of
finite tor dimension, namely
Lemmas \ref{lemma-descend-pseudo-coherent} and
\ref{lemma-descend-tor-amplitude}.
Some details omitted.
\end{proof}

\begin{lemma}
\label{lemma-pseudo-coherent}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
If $E$ is an $m$-pseudo-coherent object of $D(\mathcal{O}_X)$,
then $H^i(E)$ is a quasi-coherent $\mathcal{O}_X$-module for $i > m$.
If $E$ is pseudo-coherent, then $E$ is an object of
$D_\QCoh(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
Locally $H^i(E)$ is isomorphic to $H^i(\mathcal{E}^\bullet)$
with $\mathcal{E}^\bullet$ strictly perfect. The sheaves
$\mathcal{E}^i$ are direct summands of finite free modules,
hence quasi-coherent. The lemma follows.
\end{proof}

\begin{lemma}
\label{lemma-identify-pseudo-coherent-noetherian}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$.
Let $E$ be an object of $D_\QCoh(\mathcal{O}_X)$. For
$m \in \mathbf{Z}$ the following are equivalent
\begin{enumerate}
\item $H^i(E)$ is coherent for $i \geq m$ and zero for $i \gg 0$, and
\item $E$ is $m$-pseudo-coherent.
\end{enumerate}
In particular, $E$ is pseudo-coherent if and only if $E$ is an object
of $D^-_{\textit{Coh}}(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
As $X$ is quasi-compact we can find an affine scheme $U$ and a surjective
\'etale morphism $U \to X$ (Properties of Spaces, Lemma
\ref{spaces-properties-lemma-quasi-compact-affine-cover}).
Observe that $U$ is Noetherian.
Note that $E$ is $m$-pseudo-coherent if and only if $E|_U$ is
$m$-pseudo-coherent (follows from the definition or from
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-pseudo-coherent-independent-representative}).
Similarly, $H^i(E)$ is coherent if and only if $H^i(E)|_U = H^i(E|_U)$
is coherent (see Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-coherent-Noetherian}).
Thus we may assume that $X$ is representable.

\medskip\noindent
If $X$ is representable by a scheme $X_0$ then
(Lemma \ref{lemma-derived-quasi-coherent-small-etale-site})
we can write $E = \epsilon^*E_0$ where $E_0$ is an object of
$D_\QCoh(\mathcal{O}_{X_0})$ and
$\epsilon : X_\etale \to (X_0)_{Zar}$ is as in
(\ref{equation-epsilon}).
In this case $E$ is $m$-pseudo-coherent
if and only if $E_0$ is by Lemma \ref{lemma-descend-pseudo-coherent}.
Similarly, $H^i(E_0)$ is of finite type (i.e., coherent) if and only if
$H^i(E)$ is by Lemma \ref{lemma-descend-finite-type}.
Finally, $H^i(E_0) = 0$ if and only if $H^i(E) = 0$ by
Lemma \ref{lemma-epsilon-flat}.
Thus we reduce to the case of schemes which is
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-identify-pseudo-coherent-noetherian}.
\end{proof}

\begin{lemma}
\label{lemma-tor-qc-qs}
Let $S$ be a scheme. Let $X$ be a quasi-separated algebraic space over $S$.
Let $E$ be an object of $D_\QCoh(\mathcal{O}_X)$. Let $a \leq b$.
The following are equivalent
\begin{enumerate}
\item $E$ has tor amplitude in $[a, b]$, and
\item for all $\mathcal{F}$ in $\QCoh(\mathcal{O}_X)$
we have $H^i(E \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{F}) = 0$
for $i \not \in [a, b]$.
\end{enumerate}
\end{lemma}

\begin{proof}
It is clear that (1) implies (2). Assume (2). Let $j : U \to X$ be
an \'etale morphism with $U$ affine. As $X$ is quasi-separated $j : U \to X$
is quasi-compact and separated, hence $j_*$ transforms quasi-coherent
modules into quasi-coherent modules (Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-pushforward}).
Thus the functor
$\QCoh(\mathcal{O}_X) \to \QCoh(\mathcal{O}_U)$
is essentially surjective. It follows that condition (2)
implies the vanishing of
$H^i(E|_U \otimes_{\mathcal{O}_U}^\mathbf{L} \mathcal{G})$
for $i \not \in [a, b]$ for all quasi-coherent $\mathcal{O}_U$-modules
$\mathcal{G}$. Since it suffices to prove that $E|_U$ has tor amplitude
in $[a, b]$ we reduce to the case where $X$ is representable.

\medskip\noindent
If $X$ is representable by a scheme $X_0$ then
(Lemma \ref{lemma-derived-quasi-coherent-small-etale-site})
we can write $E = \epsilon^*E_0$ where $E_0$ is an object of
$D_\QCoh(\mathcal{O}_{X_0})$ and
$\epsilon : X_\etale \to (X_0)_{Zar}$ is as in
(\ref{equation-epsilon}). For every quasi-coherent module
$\mathcal{F}_0$ on $X_0$ the module $\epsilon^*\mathcal{F}_0$
is quasi-coherent on $X$ and
$$
H^i(E \otimes_{\mathcal{O}_X}^\mathbf{L} \epsilon^*\mathcal{F}_0)
=
\epsilon^*H^i(E_0 \otimes_{\mathcal{O}_{X_0}}^\mathbf{L} \mathcal{F}_0)
$$
as $\epsilon$ is flat (Lemma \ref{lemma-epsilon-flat}).
Moreover, the vanishing of these sheaves for $i \not \in [a, b]$
implies the same thing for
$H^i(E_0 \otimes_{\mathcal{O}_{X_0}}^\mathbf{L} \mathcal{F}_0)$
by the same lemma. Thus we've reduced the problem to the case
of schemes which is treated in
Derived Categories of Schemes, Lemma \ref{perfect-lemma-tor-qc-qs}.
\end{proof}

\begin{lemma}
\label{lemma-descend-RHom}
Let $X$ be a scheme. Let $E, F$ be objects of $D(\mathcal{O}_X)$.
Assume either
\begin{enumerate}
\item $E$ is pseudo-coherent and $F$ lies in $D^+(\mathcal{O}_X)$, or
\item $E$ is perfect and $F$ arbitrary,
\end{enumerate}
then there is a canonical isomorphism
$$
\epsilon^*R\SheafHom(E, F) \longrightarrow R\SheafHom(\epsilon^*E, \epsilon^*F)
$$
Here $\epsilon$ is as in (\ref{equation-epsilon}).
\end{lemma}

\begin{proof}
Recall that $\epsilon$ is flat (Lemma \ref{lemma-epsilon-flat}) and
hence $\epsilon^* = L\epsilon^*$. There is a canonical map
from left to right by
Cohomology on Sites, Remark
\ref{sites-cohomology-remark-prepare-fancy-base-change}.
To see this is an isomorphism we can work locally, i.e., we may
assume $X$ is an affine scheme.

\medskip\noindent
In case (1) we can represent $E$ by a bounded above complex
$\mathcal{E}^\bullet$ of finite free $\mathcal{O}_X$-modules, see
Derived Categories of Schemes, Lemma \ref{perfect-lemma-lift-pseudo-coherent}.
We may also represent $F$ by a bounded below complex $\mathcal{F}^\bullet$
of $\mathcal{O}_X$-modules. Applying
Cohomology, Lemma
\ref{cohomology-lemma-Rhom-complex-of-direct-summands-finite-free}
we see that $R\SheafHom(E, F)$ is represented by the complex with terms
$$
\bigoplus\nolimits_{n = - p + q}
\SheafHom_{\mathcal{O}_X}(\mathcal{E}^p, \mathcal{F}^q)
$$
Applying Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-Rhom-complex-of-direct-summands-finite-free}
we see that $R\SheafHom(\epsilon^*E, \epsilon^*F)$ is represented by the
complex with terms
$$
\bigoplus\nolimits_{n = - p + q}
\SheafHom_{\mathcal{O}_\etale}
(\epsilon^*\mathcal{E}^p, \epsilon^*\mathcal{F}^q)
$$
Thus the statement of the lemma boils down to the true fact
that the canonical map
$$
\epsilon^*\SheafHom_{\mathcal{O}_X}(\mathcal{E}, \mathcal{F})
\longrightarrow
\SheafHom_{\mathcal{O}_\etale}
(\epsilon^*\mathcal{E}, \epsilon^*\mathcal{F})
$$
is an isomorphism for any $\mathcal{O}_X$-module $\mathcal{F}$ and
finite free $\mathcal{O}_X$-module $\mathcal{E}$.

\medskip\noindent
In case (2) we can represent $E$ by a strictly perfect
complex $\mathcal{E}^\bullet$ of $\mathcal{O}_X$-modules, use
Derived Categories of Schemes, Lemmas
\ref{perfect-lemma-affine-compare-bounded} and
\ref{perfect-lemma-perfect-affine} and the fact that a perfect
complex of modules is represented by a finite complex of finite
projective modules. Thus we can do the exact same proof as
above, replacing the reference to
Cohomology, Lemma
\ref{cohomology-lemma-Rhom-complex-of-direct-summands-finite-free}
by a reference to
Cohomology, Lemma
\ref{cohomology-lemma-Rhom-strictly-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-coherence-internal-hom}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $L, K$ be objects of $D(\mathcal{O}_X)$.
If either
\begin{enumerate}
\item $L$ in $D^+_\QCoh(\mathcal{O}_X)$ and $K$ is pseudo-coherent,
\item $L$ in $D_\QCoh(\mathcal{O}_X)$ and $K$ is perfect,
\end{enumerate}
then $R\SheafHom(K, L)$ is in $D_\QCoh(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
This follows from the analogue for schemes
(Derived Categories of Schemes, Lemma
\ref{perfect-lemma-quasi-coherence-internal-hom})
via the criterion of Lemma \ref{lemma-check-quasi-coherence-on-covering},
the criterion of Lemmas \ref{lemma-descend-pseudo-coherent} and
\ref{lemma-descend-perfect},
and the result of Lemma \ref{lemma-descend-RHom}.
\end{proof}

\begin{lemma}
\label{lemma-internal-hom-evaluate-tensor-isomorphism}
Let $S$ be a scheme.
Let $X$ be an algebraic space over $S$.
Let $K, L, M$ be objects of $D_\QCoh(\mathcal{O}_X)$.
The map
$$
K \otimes_{\mathcal{O}_X}^\mathbf{L} R\SheafHom(M, L)
\longrightarrow
R\SheafHom(M, K \otimes_{\mathcal{O}_X}^\mathbf{L} L)
$$
of Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-internal-hom-diagonal-better}
is an isomorphism in the following cases
\begin{enumerate}
\item $M$ perfect, or
\item $K$ is perfect, or
\item $M$ is pseudo-coherent, $L \in D^+(\mathcal{O}_X)$, and $K$ has finite
tor dimension.
\end{enumerate}
\end{lemma}

\begin{proof}
Checking whether or not the map is an isomorphism can be done
\'etale locally hence we may assume $X$ is an affine scheme.
Then we can write $K, L, M$ as $\epsilon^*K_0, \epsilon^*L_0, \epsilon^*M_0$
for some $K_0, L_0, M_0$ in $D_\QCoh(\mathcal{O}_X)$ by
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}.
Then we see that Lemma \ref{lemma-descend-RHom}
reduces cases (1) and (3) to the case of schemes which
is Derived Categories of Schemes, Lemma
\ref{perfect-lemma-internal-hom-evaluate-tensor-isomorphism}.
If $K$ is perfect but no other assumptions are made, then we
do not know that either side of the arrow is in $D_\QCoh(\mathcal{O}_X)$
but the result is still true because $K$ will be represented
(after localizing further) by a finite complex of finite free modules
in which case it is clear.
\end{proof}









\section{Approximation by perfect complexes}
\label{section-approximation}

\noindent
In this section we continue the discussion started in
Derived Categories of Schemes, Section \ref{perfect-section-approximation}.

\begin{definition}
\label{definition-approximation-holds}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Consider triples $(T, E, m)$ where
\begin{enumerate}
\item $T \subset |X|$ is a closed subset,
\item $E$ is an object of $D_\QCoh(\mathcal{O}_X)$, and
\item $m \in \mathbf{Z}$.
\end{enumerate}
We say {\it approximation holds for the triple} $(T, E, m)$ if
there exists a perfect object $P$ of $D(\mathcal{O}_X)$ supported on $T$
and a map $\alpha : P \to E$ which induces isomorphisms $H^i(P) \to H^i(E)$
for $i > m$ and a surjection $H^m(P) \to H^m(E)$.
\end{definition}

\noindent
Approximation cannot hold for every triple. Please read the remarks following
Derived Categories of Schemes, Definition
\ref{perfect-definition-approximation-holds} to see why.

\begin{definition}
\label{definition-approximation}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
We say {\it approximation by perfect complexes holds}
on $X$ if for any closed subset $T \subset |X|$ such that
the morphism $X \setminus T \to X$ is quasi-compact
there exists an integer $r$ such that for every triple $(T, E, m)$ as in
Definition \ref{definition-approximation-holds} with
\begin{enumerate}
\item $E$ is $(m - r)$-pseudo-coherent, and
\item $H^i(E)$ is supported on $T$ for $i \geq m - r$
\end{enumerate}
approximation holds.
\end{definition}

\begin{lemma}
\label{lemma-pushforward-perfect}
Let $S$ be a scheme. Let $(U \subset X, j : V \to X)$ be an
elementary distinguished square of algebraic space over $S$.
Let $E$ be a perfect object of $D(\mathcal{O}_V)$ supported on
$j^{-1}(T)$ where $T = |X| \setminus |U|$. Then $Rj_*E$ is a
perfect object of $D(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
Being perfect is local on $X_\etale$. Thus it suffices to
check that $Rj_*E$ is perfect when restricted to $U$ and $V$.
We have $Rj_*E|_V = E$ by Lemma \ref{lemma-pushforward-with-support-in-open}
which is perfect. We have $Rj_*E|_U = 0$ because
$E|_{V \setminus j^{-1}(T)} = 0$ (use
Lemma \ref{lemma-restrict-direct-image-open}).
\end{proof}

\begin{lemma}
\label{lemma-open}
Let $S$ be a scheme. Let $(U \subset X, j : V \to X)$ be an elementary
distinguished square of algebraic spaces over $S$. Let $T$ be a closed
subset of $|X| \setminus |U|$ and let $(T, E, m)$ be a triple as in
Definition \ref{definition-approximation-holds}. If
\begin{enumerate}
\item approximation holds for $(j^{-1}T, E|_V, m)$, and
\item the sheaves $H^i(E)$ for $i \geq m$ are supported on $T$,
\end{enumerate}
then approximation holds for $(T, E, m)$.
\end{lemma}

\begin{proof}
Let $P \to E|_V$ be an approximation of the triple $(j^{-1}T, E|_V, m)$
over $V$. Then $Rj_*P$ is a perfect object of $D(\mathcal{O}_X)$ by
Lemma \ref{lemma-pushforward-perfect}. On the other hand,
$Rj_*P = j_!P$ by Lemma \ref{lemma-pushforward-with-support-in-open}.
We see that $j_!P$ is supported on $T$ for example by
(\ref{equation-stalk-j-shriek}).
Hence we obtain an approximation $Rj_*P = j_!P \to j_!(E|_V) \to E$.
\end{proof}

\begin{lemma}
\label{lemma-approximation-affine}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$ which is
representable by an affine scheme. Then approximation holds for every
triple $(T, E, m)$ as in Definition \ref{definition-approximation-holds}
such that there exists an integer $r \geq 0$ with
\begin{enumerate}
\item $E$ is $m$-pseudo-coherent,
\item $H^i(E)$ is supported on $T$ for $i \geq m - r + 1$,
\item $X \setminus T$ is the union of $r$ affine opens.
\end{enumerate}
In particular, approximation by perfect complexes holds for affine schemes.
\end{lemma}

\begin{proof}
Let $X_0$ be an affine scheme representing $X$. Let $T_0 \subset X_0$
by the closed subset corresponding to $T$. Let
$\epsilon : X_\etale \to X_{0, Zar}$ be the morphism
(\ref{equation-epsilon}). We may write $E = \epsilon^*E_0$ for some object
$E_0$ of $D_\QCoh(\mathcal{O}_{X_0})$, see
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}.
Then $E_0$ is $m$-pseudo-coherent, see
Lemma \ref{lemma-descend-pseudo-coherent}.
Comparing stalks of cohomology sheaves (see proof of
Lemma \ref{lemma-epsilon-flat})
we see that $H^i(E_0)$ is supported on $T_0$ for $i \geq m - r + 1$. By
Derived Categories of Schemes, Lemma \ref{perfect-lemma-approximation-affine}
there exists an approximation $P_0 \to E_0$ of
$(T_0, E_0, m)$. By Lemma \ref{lemma-descend-perfect}
we see that $P = \epsilon^*P_0$ is a perfect object of $D(\mathcal{O}_X)$.
Pulling back we obtain an approximation
$P = \epsilon^*P_0 \to \epsilon^*E_0 = E$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-induction-step}
Let $S$ be a scheme. Let $(U \subset X, j : V \to X)$ be an
elementary distinguished square of algebraic spaces over $S$.
Assume $U$ quasi-compact, $V$ affine, and $U \times_X V$ quasi-compact.
If approximation by perfect complexes holds on $U$,
then approximation by perfect complexes holds on $X$.
\end{lemma}

\begin{proof}
Let $T \subset |X|$ be a closed subset with $X \setminus T \to X$
quasi-compact. Let $r_U$ be the integer of
Definition \ref{definition-approximation}
adapted to the pair $(U, T \cap |U|)$.
Set $T' = T \setminus |U|$. Endow $T'$ with the induced reduced
subspace structure. Since $|T'|$ is contained in $|X| \setminus |U|$
we see that $j^{-1}(T') \to T'$ is an isomorphism. Moreover,
$V \setminus j^{-1}(T')$ is quasi-compact as it is the fibre product
of $U \times_X V$ with $X \setminus T$ over $X$ and we've assumed
$U \times_X V$ quasi-compact and $X \setminus T \to X$ quasi-compact.
Let $r'$ be the number of affines needed to cover $V \setminus j^{-1}(T')$.
We claim that $r = \max(r_U, r')$ works for the pair $(X, T)$.

\medskip\noindent
To see this choose a triple $(T, E, m)$ such that $E$ is
$(m - r)$-pseudo-coherent and $H^i(E)$ is supported on $T$ for
$i \geq m - r$. Let $t$ be the largest integer such that
$H^t(E)|_U$ is nonzero. (Such an integer exists as $U$ is quasi-compact
and $E|_U$ is $(m - r)$-pseudo-coherent.)
We will prove that $E$ can be approximated by induction on $t$.

\medskip\noindent
Base case: $t \leq m - r'$. This means that $H^i(E)$ is supported
on $T'$ for $i \geq m - r'$. Hence
Lemma \ref{lemma-approximation-affine}
guarantees the existence of an approximation
$P \to E|_V$ of $(T', E|_V, m)$ on $V$.
Applying Lemma \ref{lemma-open} we see that
$(T', E, m)$ can be approximated. Such an approximation
is also an approximation of $(T, E, m)$.

\medskip\noindent
Induction step. Choose an approximation $P \to E|_U$ of
$(T \cap |U|, E|_U, m)$. This in particular gives a surjection
$H^t(P) \to H^t(E|_U)$.
In the rest of the proof we will use the equivalence of
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}
(and the compatibilities of Remark \ref{remark-match-total-direct-images})
for the representable algebraic spaces $V$ and $U \times_X V$.
We will also use the fact that $(m - r)$-pseudo-coherence,
resp.\ perfectness on the Zariski site and \'etale site agree, see
Lemmas \ref{lemma-descend-pseudo-coherent} and
\ref{lemma-descend-perfect}.
Thus we can use the results of
Derived Categories of Schemes, Section \ref{perfect-section-lift}
for the open immersion $U \times_X V \subset V$. In this way
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-lift-perfect-complex-plus-shift-support}
implies there exists a perfect object $Q$ in $D(\mathcal{O}_V)$
supported on $j^{-1}(T)$ and an isomorphism
$Q|_{U \times_X V} \to (P \oplus P[1])|_{U \times_X V}$. By
Derived Categories of Schemes, Lemma \ref{perfect-lemma-lift-map}
we can replace $Q$ by $Q \otimes^\mathbf{L} I$
and assume that the map
$$
Q|_{U \times_X V} \longrightarrow
(P \oplus P[1])|_{U \times_X V} \longrightarrow
P|_{U \times_X V} \longrightarrow E|_{U \times_X V}
$$
lifts to $Q \to E|_V$. By Lemma \ref{lemma-glue}
we find an morphism $a : R \to E$ of $D(\mathcal{O}_X)$
such that $a|_U$ is isomorphic to $P \oplus P[1] \to E|_U$
and $a|_V$ isomorphic to $Q \to E|_V$.
Thus $R$ is perfect and supported on $T$
and the map $H^t(R) \to H^t(E)$ is surjective on restriction to $U$.
Choose a distinguished triangle
$$
R \to E \to E' \to R[1]
$$
Then $E'$ is $(m - r)$-pseudo-coherent
(Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-cone-pseudo-coherent}),
$H^i(E')|_U = 0$ for $i \geq t$, and
$H^i(E')$ is supported on $T$ for $i \geq m - r$.
By induction we find an approximation $R' \to E'$
of $(T, E', m)$. Fit the composition $R' \to E' \to R[1]$
into a distinguished triangle $R \to R'' \to R' \to R[1]$
and extend the morphisms $R' \to E'$ and $R[1] \to R[1]$ into
a morphism of distinguished triangles
$$
\xymatrix{
R \ar[r] \ar[d] & R'' \ar[d] \ar[r] & R' \ar[d] \ar[r] & R[1] \ar[d] \\
R \ar[r] &  E \ar[r] & E' \ar[r] & R[1]
}
$$
using TR3. Then $R''$ is a perfect complex
(Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-two-out-of-three-perfect})
supported on $T$. An easy diagram chase shows that $R'' \to E$ is the desired
approximation.
\end{proof}

\begin{theorem}
\label{theorem-approximation}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Then approximation by perfect complexes holds on $X$.
\end{theorem}

\begin{proof}
This follows from the induction principle of
Lemma \ref{lemma-induction-principle}
and Lemmas \ref{lemma-induction-step} and \ref{lemma-approximation-affine}.
\end{proof}






\section{Generating derived categories}
\label{section-generating}

\noindent
This section is the analogue of
Derived Categories of Schemes, Section \ref{perfect-section-generating}.
However, we first prove the following lemma which is the
analogue of Derived Categories of Schemes, Lemma
\ref{perfect-lemma-lift-map-from-perfect-complex-with-support}.

\begin{lemma}
\label{lemma-lift-map-from-perfect-complex-with-support}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $W \subset X$ be a quasi-compact open.
Let $T \subset |X|$ be a closed subset such that
$X \setminus T \to X$ is a quasi-compact morphism.
Let $E$ be an object of $D_\QCoh(\mathcal{O}_X)$.
Let $\alpha : P \to E|_W$ be a map where $P$ is a perfect object of
$D(\mathcal{O}_W)$ supported on $T \cap W$. Then there exists a map
$\beta : R \to E$ where $R$ is a perfect object of $D(\mathcal{O}_X)$
supported on $T$ such that $P$ is a direct summand of $R|_W$ in
$D(\mathcal{O}_W)$ compatible $\alpha$ and $\beta|_W$.
\end{lemma}

\begin{proof}
We will use the induction principle of
Lemma \ref{lemma-induction-principle-enlarge} to prove this.
Thus we immediately reduce to the case where we have an
elementary distinguished square $(W \subset X, f : V \to X)$
with $V$ affine and $P \to E|_W$ as in the statement of the lemma.
In the rest of the proof we will use
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}
(and the compatibilities of Remark \ref{remark-match-total-direct-images})
for the representable algebraic spaces $V$ and $W \times_X V$.
We will also use the fact that perfectness on the Zariski site
and \'etale site agree, see Lemma \ref{lemma-descend-perfect}.

\medskip\noindent
By Derived Categories of Schemes,
Lemma \ref{perfect-lemma-lift-perfect-complex-plus-shift-support}
we can choose a perfect object $Q$ in $D(\mathcal{O}_V)$
supported on $f^{-1}T$ and an isomorphism
$Q|_{W \times_X V} \to (P \oplus P[1])|_{W \times_X V}$. By
Derived Categories of Schemes, Lemma \ref{perfect-lemma-lift-map}
we can replace $Q$ by $Q \otimes^\mathbf{L} I$ (still supported on $f^{-1}T$)
and assume that the map
$$
Q|_{W \times_X V} \to (P \oplus P[1])|_{W \times V}
\longrightarrow P|_{W \times_X V}
\longrightarrow
E|_{W \times_X V}
$$
lifts to $Q \to E|_V$. By Lemma \ref{lemma-glue}
we find an morphism $a : R \to E$ of $D(\mathcal{O}_X)$
such that $a|_W$ is isomorphic to $P \oplus P[1] \to E|_W$
and $a|_V$ isomorphic to $Q \to E|_V$.
Thus $R$ is perfect and supported on $T$ as desired.
\end{proof}

\begin{remark}
\label{remark-addendum}
The proof of Lemma \ref{lemma-lift-map-from-perfect-complex-with-support}
shows that
$$
R|_W = P \oplus P^{\oplus n_1}[1] \oplus \ldots \oplus P^{\oplus n_m}[m]
$$
for some $m \geq 0$ and $n_j \geq 0$. Thus the highest degree cohomology sheaf
of $R|_W$ equals that of $P$. By repeating the construction for the map
$P^{\oplus n_1}[1] \oplus \ldots \oplus P^{\oplus n_m}[m] \to R|_W$, taking
cones, and using induction we can achieve equality of cohomology sheaves
of $R|_W$ and $P$ above any given degree.
\end{remark}

\begin{lemma}
\label{lemma-direct-summand-of-a-restriction}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $W$ be a quasi-compact open subspace of $X$.
Let $P$ be a perfect object of $D(\mathcal{O}_W)$.
Then $P$ is a direct summand of the restriction of a perfect
object of $D(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
Special case of Lemma \ref{lemma-lift-map-from-perfect-complex-with-support}.
\end{proof}

\begin{theorem}
\label{theorem-bondal-van-den-Bergh}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. The category
$D_\QCoh(\mathcal{O}_X)$ can be generated by a single
perfect object. More precisely, there exists a perfect object
$P$ of $D(\mathcal{O}_X)$ such that for 
$E \in D_\QCoh(\mathcal{O}_X)$ the following are equivalent
\begin{enumerate}
\item $E = 0$, and
\item $\Hom_{D(\mathcal{O}_X)}(P[n], E) = 0$ for all $n \in \mathbf{Z}$.
\end{enumerate}
\end{theorem}

\begin{proof}
We will prove this using the induction principle of
Lemma \ref{lemma-induction-principle}.

\medskip\noindent
If $X$ is affine, then $\mathcal{O}_X$ is a perfect generator.
This follows from Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}
and
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-affine-compare-bounded}.

\medskip\noindent
Assume that $(U \subset X, f : V \to X)$ is an elementary distinguished
square with $U$ quasi-compact such that the theorem holds for $U$ and $V$
is an affine scheme.
Let $P$ be a perfect object of $D(\mathcal{O}_U)$ which is a generator
for $D_\QCoh(\mathcal{O}_U)$. Using
Lemma \ref{lemma-direct-summand-of-a-restriction} we may
choose a perfect object
$Q$ of $D(\mathcal{O}_X)$ whose restriction to $U$ is a direct sum one
of whose summands is $P$. Say $V = \Spec(A)$. Let $Z \subset V$
be the reduced closed subscheme which is the inverse image of
$X \setminus U$ and maps isomorphically to it
(see Definition \ref{definition-elementary-distinguished-square}).
This is a retrocompact closed subset of $V$.
Choose $f_1, \ldots, f_r \in A$ such that
$Z = V(f_1, \ldots, f_r)$. Let $K \in D(\mathcal{O}_V)$ be the perfect
object corresponding to the Koszul complex on $f_1, \ldots, f_r$ over $A$.
Note that since $K$ is supported on $Z$, the pushforward
$K' = Rf_*K$ is a perfect object of $D(\mathcal{O}_X)$ whose
restriction to $V$ is $K$ (see Lemmas \ref{lemma-pushforward-perfect}
and \ref{lemma-pushforward-with-support-in-open}).
We claim that $Q \oplus K'$ is a generator for
$D_\QCoh(\mathcal{O}_X)$.

\medskip\noindent
Let $E$ be an object of $D_\QCoh(\mathcal{O}_X)$ such that
there are no nontrivial maps from any shift of $Q \oplus K'$ into $E$.
By Lemma \ref{lemma-pushforward-with-support-in-open}
we have $K' =  f_! K$ and hence
$$
\Hom_{D(\mathcal{O}_X)}(K'[n], E) = \Hom_{D(\mathcal{O}_V)}(K[n], E|_V)
$$
Thus by
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-orthogonal-koszul-complex}
(using also
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site})
the vanishing of these groups implies that $E|_V$ is isomorphic to
$R(U \times_X V \to V)_*E|_{U \times_X V}$. This implies that
$E = R(U \to X)_*E|_U$ (small detail omitted). If this is the case then
$$
\Hom_{D(\mathcal{O}_X)}(Q[n], E) = \Hom_{D(\mathcal{O}_U)}(Q|_U[n], E|_U)
$$
which contains $\Hom_{D(\mathcal{O}_U)}(P[n], E|_U)$ as a direct summand.
Thus by our choice of $P$ the vanishing of these groups implies that $E|_U$
is zero. Whence $E$ is zero.
\end{proof}

\begin{remark}
\label{remark-pullback-generator}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of quasi-compact and quasi-separated
algebraic spaces over $S$.
Let $E \in D_\QCoh(\mathcal{O}_Y)$ be a generator
(see Theorem \ref{theorem-bondal-van-den-Bergh}).
Then the following are equivalent
\begin{enumerate}
\item for $K \in D_\QCoh(\mathcal{O}_X)$ we have
$Rf_*K = 0$ if and only if $K = 0$,
\item $Rf_* : D_\QCoh(\mathcal{O}_X) \to D_\QCoh(\mathcal{O}_Y)$
reflects isomorphisms, and
\item $Lf^*E$ is a generator for $D_\QCoh(\mathcal{O}_X)$.
\end{enumerate}
The equivalence between (1) and (2) is a formal consequence of the fact that
$Rf_* : D_\QCoh(\mathcal{O}_X) \to D_\QCoh(\mathcal{O}_Y)$ is an
exact functor of triangulated categories. Similarly, the equivalence
between (1) and (3) follows formally from the fact that $Lf^*$
is the left adjoint to $Rf_*$.
These conditions hold if $f$ is affine (Lemma \ref{lemma-affine-morphism})
or if $f$ is an open immersion, or if $f$ is a composition of such.
\end{remark}

\noindent
The following result is an strengthening of
Theorem \ref{theorem-bondal-van-den-Bergh}
proved using exactly the same methods.
Let $T \subset |X|$ be a closed subset where $X$ is an algebraic space.
Let's denote $D_T(\mathcal{O}_X)$ the strictly full, saturated,
triangulated subcategory consisting of complexes whose
cohomology sheaves are supported on $T$.

\begin{lemma}
\label{lemma-generator-with-support}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $T \subset |X|$ be a
closed subset such that $|X| \setminus T$ is quasi-compact. With notation
as above, the category $D_{\QCoh, T}(\mathcal{O}_X)$ is generated by a
single perfect object.
\end{lemma}

\begin{proof}
We will prove this using the induction principle of
Lemma \ref{lemma-induction-principle}.
The property is true for representable quasi-compact
and quasi-separated objects of the site
$X_{spaces, \etale}$ by
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-generator-with-support}.

\medskip\noindent
Assume that $(U \subset X, f : V \to X)$ is an elementary distinguished
square such that the lemma holds for $U$ and $V$ is affine. To finish
the proof we have to show that the result holds for $X$.
Let $P$ be a perfect object of $D(\mathcal{O}_U)$ supported on $T \cap U$
which is a generator for $D_{\QCoh, T \cap U}(\mathcal{O}_U)$. Using
Lemma \ref{lemma-lift-map-from-perfect-complex-with-support}
we may choose a perfect object $Q$ of $D(\mathcal{O}_X)$ supported on $T$
whose restriction to $U$ is a direct sum one of whose summands is $P$.
Write $V = \Spec(B)$. Let $Z = X \setminus U$. Then $f^{-1}Z$ is a closed
subset of $V$ such that $V \setminus f^{-1}Z$ is quasi-compact. As $X$
is quasi-separated, it follows that
$f^{-1}Z \cap f^{-1}T = f^{-1}(Z \cap T)$ is a closed
subset of $V$ such that $W = V \setminus f^{-1}(Z \cap T)$ is quasi-compact.
Thus we can choose $g_1, \ldots, g_s \in B$ such that
$f^{-1}(Z \cap T) = V(g_1, \ldots, g_r)$.
Let $K \in D(\mathcal{O}_V)$ be the perfect object corresponding to the
Koszul complex on $g_1, \ldots, g_s$ over $B$. Note that since $K$ is
supported on $f^{-1}(Z \cap T) \subset V$ closed, the pushforward
$K' = R(V \to X)_*K$ is a perfect object of $D(\mathcal{O}_X)$ whose
restriction to $V$ is $K$ (see Lemmas \ref{lemma-pushforward-perfect}
and \ref{lemma-pushforward-with-support-in-open}).
We claim that $Q \oplus K'$ is a generator for
$D_{\QCoh, T}(\mathcal{O}_X)$.

\medskip\noindent
Let $E$ be an object of $D_{\QCoh, T}(\mathcal{O}_X)$ such that
there are no nontrivial maps from any shift of $Q \oplus K'$ into $E$.
By Lemma \ref{lemma-pushforward-with-support-in-open}
we have $K' =  R(V \to X)_! K$ and hence
$$
\Hom_{D(\mathcal{O}_X)}(K'[n], E) = \Hom_{D(\mathcal{O}_V)}(K[n], E|_V)
$$
Thus by
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-orthogonal-koszul-complex} we have
$E|_V = Rj_*E|_W$ where $j : W \to V$ is the inclusion. Picture
$$
\xymatrix{
W \ar[r]_j & V & Z \cap T \ar[l] \ar[d] \\
V \setminus f^{-1}Z \ar[u]^{j'} \ar[ru]_{j''} & & Z \ar[lu]
}
$$
Since $E$ is supported on $T$ we see that $E|_W$ is supported on
$f^{-1}T \cap W = f^{-1}T \cap (V \setminus f^{-1}Z)$
which is closed in $W$. We conclude that
$$
E|_V = Rj_*(E|_W) = Rj_*(Rj'_*(E|_{U \cap V})) = Rj''_*(E|_{U \cap V})
$$
Here the second equality is part (1) of
Cohomology, Lemma \ref{cohomology-lemma-pushforward-restriction}
which applies because $V$ is a scheme and $E$ has quasi-coherent
cohomology sheaves hence pushforward along the quasi-compact
open immersion $j'$ agrees with pushforward on the underlying schemes, see
Remark \ref{remark-match-total-direct-images}.
This implies that $E = R(U \to X)_*E|_U$ (small detail omitted). If
this is the case then
$$
\Hom_{D(\mathcal{O}_X)}(Q[n], E) = \Hom_{D(\mathcal{O}_U)}(Q|_U[n], E|_U)
$$
which contains $\Hom_{D(\mathcal{O}_U)}(P[n], E|_U)$ as a direct summand.
Thus by our choice of $P$ the vanishing of these groups implies that $E|_U$
is zero. Whence $E$ is zero.
\end{proof}










\section{Compact and perfect objects}
\label{section-compact}

\noindent
This section is the analogue of
Derived Categories of Schemes, Section \ref{perfect-section-compact}.

\begin{proposition}
\label{proposition-compact-is-perfect}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
An object of $D_\QCoh(\mathcal{O}_X)$ is compact
if and only if it is perfect.
\end{proposition}

\begin{proof}
If $K$ is a perfect object of $D(\mathcal{O}_X)$ with dual
$K^\vee$ (Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-dual-perfect-complex})
we have
$$
\Hom_{D(\mathcal{O}_X)}(K, M) =
H^0(X, K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} M)
$$
functorially in $M$. Since $K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} -$
commutes with direct sums and since $H^0(X, -)$ commutes with direct
sums on $D_\QCoh(\mathcal{O}_X)$ by
Lemma \ref{lemma-quasi-coherence-pushforward-direct-sums}
we conclude that $K$ is compact in $D_\QCoh(\mathcal{O}_X)$.

\medskip\noindent
Conversely, let $K$ be a compact object of $D_\QCoh(\mathcal{O}_X)$.
To show that $K$ is perfect, it suffices to show that
$K|_U$ is perfect for every affine scheme $U$ \'etale over $X$, see
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-perfect-independent-representative}.
Observe that $j : U \to X$ is a quasi-compact and separated morphism.
Hence
$Rj_* : D_\QCoh(\mathcal{O}_U) \to D_\QCoh(\mathcal{O}_X)$
commutes with direct sums, see
Lemma \ref{lemma-quasi-coherence-pushforward-direct-sums}.
Thus the adjointness of restriction to $U$ and $Rj_*$ implies that
$K|_U$ is a perfect object of $D_\QCoh(\mathcal{O}_U)$.
Hence we reduce to the case that $X$ is affine, in particular a
quasi-compact and quasi-separated scheme. Via
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} and
\ref{lemma-descend-perfect}
we reduce to the case of schemes, i.e., to
Derived Categories of Schemes, Proposition
\ref{perfect-proposition-compact-is-perfect}.
\end{proof}

\begin{remark}
\label{remark-classical-generator}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $G$ be a
perfect object of $D(\mathcal{O}_X)$ which is a generator for
$D_\QCoh(\mathcal{O}_X)$. By Theorem \ref{theorem-bondal-van-den-Bergh}
there is at least one of these. Combining
Lemma \ref{lemma-quasi-coherence-direct-sums} with
Proposition \ref{proposition-compact-is-perfect} and with
Derived Categories, Proposition
\ref{derived-proposition-generator-versus-classical-generator}
we see that $G$ is a classical generator for $D_{perf}(\mathcal{O}_X)$.
\end{remark}

\noindent
The following result is a strengthening of
Proposition \ref{proposition-compact-is-perfect}.
Let $T \subset |X|$ be a closed subset where $X$ is an algebraic space.
As before $D_T(\mathcal{O}_X)$ denotes the strictly full, saturated,
triangulated subcategory consisting of complexes whose
cohomology sheaves are supported on $T$. Since taking direct
sums commutes with taking cohomology sheaves, it follows
that $D_T(\mathcal{O}_X)$ has direct sums and that they are equal
to direct sums in $D(\mathcal{O}_X)$.

\begin{lemma}
\label{lemma-compact-is-perfect-with-support}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $T \subset |X|$ be a closed subset such that $|X| \setminus T$
is quasi-compact. An object of $D_{\QCoh, T}(\mathcal{O}_X)$ is compact
if and only if it is perfect as an object of $D(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
We observe that $D_{\QCoh, T}(\mathcal{O}_X)$ is a triangulated
category with direct sums by the remark preceding the lemma.
By Proposition \ref{proposition-compact-is-perfect}
the perfect objects define compact objects of $D(\mathcal{O}_X)$
hence a fortiori of any subcategory preserved under taking direct
sums. For the converse we will use there exists a generator
$E \in D_{\QCoh, T}(\mathcal{O}_X)$ which is a perfect complex
of $\mathcal{O}_X$-modules, see
Lemma \ref{lemma-generator-with-support}.
Hence by the above, $E$ is compact. Then it follows from
Derived Categories, Proposition
\ref{derived-proposition-generator-versus-classical-generator}
that $E$ is a classical generator of the full subcategory
of compact objects of $D_{\QCoh, T}(\mathcal{O}_X)$.
Thus any compact object can be constructed out of $E$ by
a finite sequence of operations consisting of
(a) taking shifts, (b) taking finite direct sums, (c) taking cones, and
(d) taking direct summands. Each of these operations preserves
the property of being perfect and the result follows.
\end{proof}

\begin{remark}
\label{remark-classical-generator-with-support}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $T \subset |X|$ be a closed subset such that $|X| \setminus T$
is quasi-compact. Let $G$ be a
perfect object of $D_{\QCoh, T}(\mathcal{O}_X)$ which is a generator for
$D_{\QCoh, T}(\mathcal{O}_X)$. By Lemma \ref{lemma-generator-with-support}
there is at least one of these. Combining the fact that
$D_{\QCoh, T}(\mathcal{O}_X)$ has direct sums with
Lemma \ref{lemma-compact-is-perfect-with-support} and with
Derived Categories, Proposition
\ref{derived-proposition-generator-versus-classical-generator}
we see that $G$ is a classical generator for $D_{perf, T}(\mathcal{O}_X)$.
\end{remark}

\noindent
The following lemma is an application of the ideas that go into
the proof of the preceding lemma.

\begin{lemma}
\label{lemma-map-from-pseudo-coherent-to-complex-with-support}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $T \subset |X|$
be a closed subset such that the complement $U \subset X$ is quasi-compact.
Let $\alpha : P \to E$ be a morphism of $D_\QCoh(\mathcal{O}_X)$ with
either
\begin{enumerate}
\item $P$ is perfect and $E$ supported on $T$, or
\item $P$ pseudo-coherent, $E$ supported on $T$, and $E$ bounded below.
\end{enumerate}
Then there exists a perfect complex of $\mathcal{O}_X$-modules $I$
and a map $I \to \mathcal{O}_X[0]$ such that
$I \otimes^\mathbf{L} P \to E$ is zero and such that
$I|_U \to \mathcal{O}_U[0]$ is an
isomorphism.
\end{lemma}

\begin{proof}
Set $\mathcal{D} = D_{\QCoh, T}(\mathcal{O}_X)$. In both cases the complex
$K = R\SheafHom(P, E)$ is an object of $\mathcal{D}$. See
Lemma \ref{lemma-quasi-coherence-internal-hom} for quasi-coherence.
It is clear that $K$ is supported on $T$ as formation of $R\SheafHom$
commutes with restriction to opens.
The map $\alpha$ defines an element of
$H^0(K) = \Hom_{D(\mathcal{O}_X)}(\mathcal{O}_X[0], K)$.
Then it suffices to prove the result for the map
$\alpha : \mathcal{O}_X[0] \to K$.

\medskip\noindent
Let $E \in \mathcal{D}$ be a perfect generator, see
Lemma \ref{lemma-generator-with-support}. Write
$$
K = \text{hocolim} K_n
$$
as in Derived Categories, Lemma \ref{derived-lemma-write-as-colimit}
using the generator $E$. Since the functor $\mathcal{D} \to D(\mathcal{O}_X)$
commutes with direct sums, we see that $K = \text{hocolim} K_n$
holds in $D(\mathcal{O}_X)$. Since $\mathcal{O}_X$ is a compact
object of $D(\mathcal{O}_X)$ we find an $n$ and a morphism
$\alpha_n : \mathcal{O}_X \to K_n$ which gives rise to $\alpha$, see
Derived Categories, Lemma \ref{derived-lemma-commutes-with-countable-sums}.
By Derived Categories, Lemma \ref{derived-lemma-factor-through}
applied to the morphism $\mathcal{O}_X[0] \to K_n$ in the ambient
category $D(\mathcal{O}_X)$ we see that $\alpha_n$ factors as
$\mathcal{O}_X[0] \to Q \to K_n$ where $Q$ is an object
of $\langle E \rangle$. We conclude that $Q$ is a perfect complex
supported on $T$.

\medskip\noindent
Choose a distinguished triangle
$$
I \to \mathcal{O}_X[0] \to Q \to I[1]
$$
By construction $I$ is perfect, the map $I \to \mathcal{O}_X[0]$
restricts to an isomorphism over $U$, and the composition
$I \to K$ is zero as $\alpha$ factors through $Q$.
This proves the lemma.
\end{proof}










\section{Derived categories as module categories}
\label{section-derived-is-dga}

\noindent
The section is the analogue of
Derived Categories of Schemes, Section \ref{perfect-section-derived-is-dga}.

\begin{lemma}
\label{lemma-tensor-with-QCoh-complex}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$. Let $K^\bullet$
be a complex of $\mathcal{O}_X$-modules whose cohomology sheaves are
quasi-coherent. Let
$(E, d) = \Hom_{\text{Comp}^{dg}(\mathcal{O}_X)}(K^\bullet, K^\bullet)$
be the endomorphism differential graded algebra. Then the functor
$$
- \otimes_E^\mathbf{L} K^\bullet :
D(E, \text{d}) \longrightarrow D(\mathcal{O}_X)
$$
of
Differential Graded Algebra, Lemma
\ref{dga-lemma-tensor-with-complex-derived}
has image contained in $D_\QCoh(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
Let $P$ be a differential graded $E$-module with property $P$.
Let $F_\bullet$ be a filtration on $P$ as in
Differential Graded Algebra, Section \ref{dga-section-P-resolutions}.
Then we have
$$
P \otimes_E K^\bullet = \text{hocolim}\ F_iP \otimes_E K^\bullet
$$
Each of the $F_iP$ has a finite filtration whose graded pieces
are direct sums of $E[k]$. The result follows easily.
\end{proof}

\noindent
The following lemma can be strengthened (there is a uniformity
in the vanishing over all $L$ with nonzero cohomology sheaves
only in a fixed range).

\begin{lemma}
\label{lemma-ext-from-perfect-into-bounded-QCoh}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $K$ be a perfect object of $D(\mathcal{O}_X)$. Then
\begin{enumerate}
\item there exist integers $a \leq b$ such that
$\Hom_{D(\mathcal{O}_X)}(K, L) = 0$ for $L \in D_\QCoh(\mathcal{O}_X)$
with $H^i(L) = 0$ for $i \in [a, b]$, and
\item if $L$ is bounded, then $\Ext^n_{D(\mathcal{O}_X)}(K, L)$
is zero for all but finitely many $n$.
\end{enumerate}
\end{lemma}

\begin{proof}
Part (2) follows from (1) as $\Ext^n_{D(\mathcal{O}_X)}(K, L) =
\Hom_{D(\mathcal{O}_X)}(K, L[n])$. We prove (1).
Since $K$ is perfect we have
$$
\Ext^i_{D(\mathcal{O}_X)}(K, L) =
H^i(X, K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L)
$$
where $K^\vee$ is the ``dual'' perfect complex to $K$, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}.
Note that $P = K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L$
is in $D_\QCoh(X)$ by
Lemmas \ref{lemma-quasi-coherence-tensor-product} and
\ref{lemma-pseudo-coherent} (to see that a perfect complex
has quasi-coherent cohomology sheaves). Say $K^\vee$ has
tor amplitude in $[a, b]$. Then the spectral sequence
$$
E_1^{p, q} = H^p(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} H^q(L))
\Rightarrow
H^{p + q}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L)
$$
shows that $H^j(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L)$
is zero if $H^q(L) = 0$ for $q \in [j - b, j - a]$.
Let $N$ be the integer $\max(d_p + p)$ of
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-vanishing-quasi-separated}.
Then $H^0(X, K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L)$
vanishes if the cohomology sheaves
$$
H^{-N}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L),
\ H^{-N + 1}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L),
\ \ldots,
\ H^0(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L)
$$
are zero. Namely, by the lemma cited and
Lemma \ref{lemma-application-nice-K-injective}, we have
$$
H^0(X, K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L) =
H^0(X, \tau_{\geq -N}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L))
$$
and by the vanishing of cohomology sheaves, this is equal to
$H^0(X, \tau_{\geq 1}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L))$
which is zero by Derived Categories, Lemma
\ref{derived-lemma-negative-vanishing}.
It follows that $\Hom_{D(\mathcal{O}_X)}(K, L)$ is zero if
$H^i(L) = 0$ for $i \in [-b - N, -a]$.
\end{proof}

\noindent
The following is the analogue of
Derived Categories of Schemes, Theorem \ref{perfect-theorem-DQCoh-is-Ddga}.

\begin{theorem}
\label{theorem-DQCoh-is-Ddga}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Then there exist a differential graded algebra $(E, \text{d})$
with only a finite number of nonzero cohomology groups $H^i(E)$
such that $D_\QCoh(\mathcal{O}_X)$ is equivalent
to $D(E, \text{d})$.
\end{theorem}

\begin{proof}
Let $K^\bullet$ be a K-injective complex of $\mathcal{O}$-modules which
is perfect and generates $D_\QCoh(\mathcal{O}_X)$. Such a
thing exists by Theorem \ref{theorem-bondal-van-den-Bergh}
and the existence of K-injective resolutions. We will show the
theorem holds with
$$
(E, \text{d}) = \Hom_{\text{Comp}^{dg}(\mathcal{O}_X)}(K^\bullet, K^\bullet)
$$
where $\text{Comp}^{dg}(\mathcal{O}_X)$ is the differential graded category
of complexes of $\mathcal{O}$-modules. Please see
Differential Graded Algebra, Section \ref{dga-section-variant-base-change}.
Since $K^\bullet$ is K-injective we
have
\begin{equation}
\label{equation-E-is-OK}
H^n(E) = \Ext^n_{D(\mathcal{O}_X)}(K^\bullet, K^\bullet)
\end{equation}
for all $n \in \mathbf{Z}$. Only a finite number of these Exts
are nonzero by Lemma \ref{lemma-ext-from-perfect-into-bounded-QCoh}.
Consider the functor
$$
- \otimes_E^\mathbf{L} K^\bullet :
D(E, \text{d}) \longrightarrow D(\mathcal{O}_X)
$$
of
Differential Graded Algebra, Lemma
\ref{dga-lemma-tensor-with-complex-derived}.
Since $K^\bullet$ is perfect, it defines a compact object of
$D(\mathcal{O}_X)$, see Proposition \ref{proposition-compact-is-perfect}.
Combined with (\ref{equation-E-is-OK}) the functor above is fully
faithful as follows from
Differential Graded Algebra, Lemmas
\ref{dga-lemma-fully-faithful-in-compact-case}. It has a right adjoint
$$
R\Hom(K^\bullet, - ) : D(\mathcal{O}_X) \longrightarrow D(E, \text{d})
$$
by Differential Graded Algebra, Lemmas
\ref{dga-lemma-tensor-with-complex-hom-adjoint}
which is a left quasi-inverse functor by generalities on adjoint
functors. On the other hand, it follows from
Lemma \ref{lemma-tensor-with-QCoh-complex} that we obtain
$$
- \otimes_E^\mathbf{L} K^\bullet :
D(E, \text{d}) \longrightarrow D_\QCoh(\mathcal{O}_X)
$$
and by our choice of $K^\bullet$ as a generator of
$D_\QCoh(\mathcal{O}_X)$ the kernel of the adjoint
restricted to $D_\QCoh(\mathcal{O}_X)$ is zero.
A formal argument shows that we obtain the desired equivalence, see
Derived Categories, Lemma
\ref{derived-lemma-fully-faithful-adjoint-kernel-zero}.
\end{proof}

\begin{remark}[Variant with support]
\label{remark-DQCoh-is-Ddga-with-support}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space.
Let $T \subset |X|$ be a closed subset such that
$|X| \setminus T$ is quasi-compact.
The analogue of Theorem \ref{theorem-DQCoh-is-Ddga} holds
for $D_{\QCoh, T}(\mathcal{O}_X)$.
This follows from the exact same argument as in the proof
of the theorem, using
Lemmas \ref{lemma-generator-with-support} and
\ref{lemma-compact-is-perfect-with-support}
and a variant of Lemma \ref{lemma-tensor-with-QCoh-complex}
with supports.
If we ever need this, we will precisely state the
result here and give a detailed proof.
\end{remark}

\begin{remark}[Uniqueness of dga]
\label{remark-independence-choice}
Let $X$ be a quasi-compact and quasi-separated algebraic space over a ring $R$.
By the construction of the proof of
Theorem \ref{theorem-DQCoh-is-Ddga}
there exists a differential graded algebra $(A, \text{d})$ over $R$
such that $D_\QCoh(X)$ is $R$-linearly equivalent to
$D(A, \text{d})$ as a triangulated category.
One may ask: how unique is $(A, \text{d})$?
The answer is (only) slightly better than just saying that
$(A, \text{d})$ is well defined up to derived equivalence.
Namely, suppose that $(B, \text{d})$ is a second such pair.
Then we have
$$
(A, \text{d}) = \Hom_{\text{Comp}^{dg}(\mathcal{O}_X)}(K^\bullet, K^\bullet)
$$
and
$$
(B, \text{d}) = \Hom_{\text{Comp}^{dg}(\mathcal{O}_X)}(L^\bullet, L^\bullet)
$$
for some K-injective complexes $K^\bullet$ and $L^\bullet$
of $\mathcal{O}_X$-modules corresponding to perfect generators
of $D_\QCoh(\mathcal{O}_X)$. Set
$$
\Omega = \Hom_{\text{Comp}^{dg}(\mathcal{O}_X)}(K^\bullet, L^\bullet)
\quad
\Omega' = \Hom_{\text{Comp}^{dg}(\mathcal{O}_X)}(L^\bullet, K^\bullet)
$$
Then $\Omega$ is a differential graded $B^{opp} \otimes_R A$-module
and $\Omega'$ is a differential graded $A^{opp} \otimes_R B$-module.
Moreover, the equivalence
$$
D(A, \text{d}) \to D_\QCoh(\mathcal{O}_X) \to
D(B, \text{d})
$$
is given by the functor $- \otimes_A^\mathbf{L} \Omega'$ and
similarly for the quasi-inverse. Thus we are in the situation
of Differential Graded Algebra, Remark \ref{dga-remark-hochschild-cohomology}.
If we ever need this remark we will provide a precise statement
with a detailed proof here.
\end{remark}











\section{Characterizing pseudo-coherent complexes, I}
\label{section-pseudo-coherent-hocolim}

\noindent
This material will be continued in More on Morphisms of Spaces, Section
\ref{spaces-more-morphisms-section-characterize-pseudo-coherent}.
We can characterize pseudo-coherent
objects as derived homotopy limits of approximations by perfect objects.

\begin{lemma}
\label{lemma-pseudo-coherent-hocolim}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $K \in D(\mathcal{O}_X)$. The following are equivalent
\begin{enumerate}
\item $K$ is pseudo-coherent, and
\item $K = \text{hocolim} K_n$ where
$K_n$ is perfect and $\tau_{\geq -n}K_n \to \tau_{\geq -n}K$
is an isomorphism for all $n$.
\end{enumerate}
\end{lemma}

\begin{proof}
The implication (2) $\Rightarrow$ (1) is true on any ringed site.
Namely, assume (2) holds. Recall that a perfect object of the derived
category is pseudo-coherent, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-perfect}.
Then it follows from the definitions that
$\tau_{\geq -n}K_n$ is $(-n + 1)$-pseudo-coherent
and hence $\tau_{\geq -n}K$ is $(-n + 1)$-pseudo-coherent,
hence $K$ is $(-n + 1)$-pseudo-coherent. This is true for
all $n$, hence $K$ is pseudo-coherent, see
Cohomology on Sites, Definition
\ref{sites-cohomology-definition-pseudo-coherent}.

\medskip\noindent
Assume (1). We start by choosing an approximation
$K_1 \to K$ of $(X, K, -2)$ by a perfect complex $K_1$, see
Definitions \ref{definition-approximation-holds} and
\ref{definition-approximation} and
Theorem \ref{theorem-approximation}.
Suppose by induction we have
$$
K_1 \to K_2 \to \ldots \to K_n \to K
$$
with $K_i$ perfect such that
such that $\tau_{\geq -i}K_i \to \tau_{\geq -i}K$ is an isomorphism
for all $1 \leq i \leq n$. Then we pick $a \leq b$ as in
Lemma \ref{lemma-ext-from-perfect-into-bounded-QCoh}
for the perfect object $K_n$. Choose an approximation
$K_{n + 1} \to K$ of $(X, K, \min(a - 1, -n - 1))$.
Choose a distinguished triangle
$$
K_{n + 1} \to K \to C \to K_{n + 1}[1]
$$
Then we see that $C \in D_\QCoh(\mathcal{O}_X)$ has
$H^i(C) = 0$ for $i \geq a$. Thus by our choice of $a, b$
we see that $\Hom_{D(\mathcal{O}_X)}(K_n, C) = 0$.
Hence the composition $K_n \to K \to C$ is zero. Hence by
Derived Categories, Lemma \ref{derived-lemma-representable-homological}
we can factor $K_n \to K$ through $K_{n + 1}$
proving the induction step.

\medskip\noindent
We still have to prove that $K = \text{hocolim} K_n$.
This follows by an application of
Derived Categories, Lemma \ref{derived-lemma-cohomology-of-hocolim}
to the functors
$H^i( - ) : D(\mathcal{O}_X) \to \textit{Mod}(\mathcal{O}_X)$
and our choice of $K_n$.
\end{proof}

\begin{lemma}
\label{lemma-pseudo-coherent-hocolim-with-support}
Let $X$ be a quasi-compact and quasi-separated scheme.
Let $T \subset X$ be a closed subset such that $X \setminus T$
is quasi-compact. Let $K \in D(\mathcal{O}_X)$ supported on $T$.
The following are equivalent
\begin{enumerate}
\item $K$ is pseudo-coherent, and
\item $K = \text{hocolim} K_n$ where
$K_n$ is perfect, supported on $T$, and
$\tau_{\geq -n}K_n \to \tau_{\geq -n}K$ is an isomorphism for all $n$.
\end{enumerate}
\end{lemma}

\begin{proof}
The proof of this lemma is exactly the same as the proof of
Lemma \ref{lemma-pseudo-coherent-hocolim}
except that in the choice of the approximations we use
the triples $(T, K, m)$.
\end{proof}











\section{The coherator revisited}
\label{section-better-coherator}

\noindent
In Section \ref{section-coherator} we constructed and studied
the right adjoint $RQ_X$ to the canonical functor
$D(\QCoh(\mathcal{O}_X)) \to D(\mathcal{O}_X)$.
It was constructed as the right derived extension of the coherator
$Q_X : \textit{Mod}(\mathcal{O}_X) \to \QCoh(\mathcal{O}_X)$.
In this section, we study when the inclusion functor
$$
D_\QCoh(\mathcal{O}_X) \longrightarrow D(\mathcal{O}_X)
$$
has a right adjoint. If this right adjoint exists, we will
denote\footnote{This is probably nonstandard notation. However, we have already
used $Q_X$ for the coherator and $RQ_X$ for its derived extension.} it
$$
DQ_X :
D(\mathcal{O}_X) \longrightarrow D_\QCoh(\mathcal{O}_X)
$$
It turns out that quasi-compact and quasi-separated
algebraic spaces have such a right adjoint.

\begin{lemma}
\label{lemma-better-coherator}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
The inclusion functor $D_\QCoh(\mathcal{O}_X) \to D(\mathcal{O}_X)$
has a right adjoint.
\end{lemma}

\begin{proof}[First proof]
We will use the induction principle in
Lemma \ref{lemma-induction-principle}
to prove this. If $D(\QCoh(\mathcal{O}_X)) \to D_\QCoh(\mathcal{O}_X)$
is an equivalence, then the lemma is true because the functor
$RQ_X$ of Section \ref{section-coherator} is a right adjoint to the functor
$D(\QCoh(\mathcal{O}_X)) \to D(\mathcal{O}_X)$.
In particular, our lemma is true for affine algebraic spaces, see
Lemma \ref{lemma-affine-coherator}.
Thus we see that it suffices to show: if $(U \subset X, f : V \to X)$
is an elementary distinguished square with $U$ quasi-compact
and $V$ affine and the lemma holds for $U$, $V$, and $U \times_X V$,
then the lemma holds for $X$.

\medskip\noindent
The adjoint exists if and only if for every object $K$ of
$D(\mathcal{O}_X)$ we can find a distinguished triangle
$$
E' \to E \to K \to E'[1]
$$
in $D(\mathcal{O}_X)$
such that $E'$ is in $D_\QCoh(\mathcal{O}_X)$ and such that
$\Hom(M, K) = 0$ for all $M$ in $D_\QCoh(\mathcal{O}_X)$. See
Derived Categories, Lemma \ref{derived-lemma-right-adjoint}.
Consider the distinguished triangle
$$
E \to Rj_{U, *}E|_U \oplus Rj_{V, *}E|_V \to
Rj_{U \times_X V, *}E|_{U \times_X V} \to E[1]
$$
in $D(\mathcal{O}_X)$ of Lemma \ref{lemma-exact-sequence-j-star}.
By Derived Categories, Lemma \ref{derived-lemma-prepare-adjoint}
it suffices to construct the desired distinguished triangles
for $Rj_{U, *}E|_U$, $Rj_{V, *}E|_V$, and
$Rj_{U \times_X V, *}E|_{U \times_X V}$. This reduces us to the statement
discussed in the next paragraph.

\medskip\noindent
Let $j : U \to X$ be an \'etale morphism corresponding with
$U$ quasi-compact and quasi-separated and the lemma is true for $U$.
Let $L$ be an object of $D(\mathcal{O}_U)$.
Then there exists a distinguished triangle
$$
E' \to Rj_*L \to K \to E'[1]
$$
in $D(\mathcal{O}_X)$
such that $E'$ is in $D_\QCoh(\mathcal{O}_X)$ and such that
$\Hom(M, K) = 0$ for all $M$ in $D_\QCoh(\mathcal{O}_X)$.
To see this we choose a distinguished triangle
$$
L' \to L \to Q \to L'[1]
$$
in $D(\mathcal{O}_U)$ such that $L'$ is in $D_\QCoh(\mathcal{O}_U)$
and such that $\Hom(N, Q) = 0$ for all $N$ in $D_\QCoh(\mathcal{O}_U)$.
This is possible because the statement in
Derived Categories, Lemma \ref{derived-lemma-right-adjoint}
is an if and only if.
We obtain a distinguished triangle
$$
Rj_*L' \to Rj_*L \to Rj_*Q \to Rj_*L'[1]
$$
in $D(\mathcal{O}_X)$. Observe that $Rj_*L'$ is in $D_\QCoh(\mathcal{O}_X)$
by Lemma \ref{lemma-quasi-coherence-direct-image}.
On the other hand, if $M$ in $D_\QCoh(\mathcal{O}_X)$, then
$$
\Hom(M, Rj_*Q) = \Hom(Lj^*M, Q) = 0
$$
because $Lj^*M$ is in $D_\QCoh(\mathcal{O}_U)$ by
Lemma \ref{lemma-quasi-coherence-pullback}.
This finishes the proof.
\end{proof}

\begin{proof}[Second proof]
The adjoint exists by Derived Categories, Proposition
\ref{derived-proposition-brown}. The hypotheses are satisfied:
First, note that $D_\QCoh(\mathcal{O}_X)$ has direct sums
and direct sums commute with the inclusion functor
(Lemma \ref{lemma-quasi-coherence-direct-sums}).
On the other hand, $D_\QCoh(\mathcal{O}_X)$
is compactly generated because it has a perfect
generator Theorem \ref{theorem-bondal-van-den-Bergh}
and because perfect objects are compact by
Proposition \ref{proposition-compact-is-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-pushforward-better-coherator}
Let $S$ be a scheme.
Let $f : X \to Y$ be a quasi-compact and quasi-separated
morphism of algebraic spaces over $S$.
If the right adjoints $DQ_X$ and $DQ_Y$
of the inclusion functors $D_\QCoh \to D$ exist for $X$ and $Y$, then
$$
Rf_* \circ DQ_X = DQ_Y \circ Rf_*
$$
\end{lemma}

\begin{proof}
The statement makes sense because $Rf_*$ sends
$D_\QCoh(\mathcal{O}_X)$ into $D_\QCoh(\mathcal{O}_Y)$ by
Lemma \ref{lemma-quasi-coherence-direct-image}.
The statement is true because $Lf^*$ similarly maps
$D_\QCoh(\mathcal{O}_Y)$ into $D_\QCoh(\mathcal{O}_X)$
(Lemma \ref{lemma-quasi-coherence-pullback})
and hence both $Rf_* \circ DQ_X$ and $DQ_Y \circ Rf_*$
are right adjoint to $Lf^* : D_\QCoh(\mathcal{O}_Y) \to D(\mathcal{O}_X)$.
\end{proof}

\begin{remark}
\label{remark-explain-consequence}
Let $S$ be a scheme. Let $(U \subset X, f : V \to X)$ be an
elementary distinguished square of algebraic spaces over $S$.
Assume $X$, $U$, $V$ are quasi-compact and quasi-separated.
By Lemma \ref{lemma-better-coherator} the functors
$DQ_X$, $DQ_U$, $DQ_V$, $DQ_{U \times_X V}$ exist. Moreover, there is a
canonical distinguished triangle
$$
DQ_X(K) \to Rj_{U, *}DQ_U(K|_U) \oplus Rj_{V, *}DQ_V(K|_V)
\to Rj_{U \times_X V, *}DQ_{U \times_X V}(K|_{U \times_X V}) \to
$$
for any $K \in D(\mathcal{O}_X)$. This follows by applying the
exact functor $DQ_X$ to the distinguished triangle of
Lemma \ref{lemma-exact-sequence-j-star}
and using Lemma \ref{lemma-pushforward-better-coherator} three times.
\end{remark}

\begin{lemma}
\label{lemma-boundedness-better-coherator}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
The functor $DQ_X$ of Lemma \ref{lemma-better-coherator}
has the following boundedness property:
there exists an integer $N = N(X)$ such that, if
$K$ in $D(\mathcal{O}_X)$ with
$H^i(U, K) = 0$ for $U$ affine \'etale over $X$ and $i \not \in [a, b]$, then
the cohomology sheaves $H^i(DQ_X(K))$ are zero for
$i \not \in [a, b + N]$.
\end{lemma}

\begin{proof}
We will prove this using the induction principle of
Lemma \ref{lemma-induction-principle}.

\medskip\noindent
If $X$ is affine, then the lemma is true with $N = 0$ because then
$RQ_X = DQ_X$ is given by taking the complex of
quasi-coherent sheaves associated to $R\Gamma(X, K)$.
See Lemma \ref{lemma-affine-coherator}.

\medskip\noindent
Let $(U \subset W, f : V \to W)$ be an elementary distinguished square
with $W$ quasi-compact and quasi-separated, $U \subset W$
quasi-compact open, $V$ affine such that
the lemma holds for $U$, $V$, and $U \times_W V$.
Say with integers $N(U)$, $N(V)$, and $N(U \times_W V)$.
Now suppose $K$ is in $D(\mathcal{O}_X)$ with
$H^i(W, K) = 0$ for all affine $W$ \'etale over $X$ and all $i \not \in [a, b]$.
Then $K|_U$, $K|_V$, $K|_{U \times_W V}$ have the same property.
Hence we see that $RQ_U(K|_U)$ and $RQ_V(K|_V)$ and
$RQ_{U \cap V}(K|_{U \times_W V})$ have vanishing cohomology
sheaves outside the inverval $[a, b + \max(N(U), N(V), N(U \times_W V))$.
Since the functors $Rj_{U, *}$, $Rj_{V, *}$, $Rj_{U \times_W V, *}$
have finite cohomological dimension on $D_\QCoh$ by
Lemma \ref{lemma-quasi-coherence-direct-image}
we see that there exists an $N$ such that
$Rj_{U, *}DQ_U(K|_U)$, $Rj_{V, *}DQ_V(K|_V)$, and
$Rj_{U \cap V, *}DQ_{U \times_W V}(K|_{U \times_W V})$ have vanishing
cohomology sheaves outside the interval $[a, b + N]$.
Then finally we conclude by the distinguished triangle
of Remark \ref{remark-explain-consequence}.
\end{proof}

\begin{example}
\label{example-inverse-limit-quasi-coherent}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $(\mathcal{F}_n)$
be an inverse system of quasi-coherent sheaves on $X$.
Since $DQ_X$ is a right
adjoint it commutes with products and therefore with derived limits.
Hence we see that
$$
DQ_X(R\lim \mathcal{F}_n) =
(R\lim\text{ in }D_\QCoh(\mathcal{O}_X))(\mathcal{F}_n)
$$
where the first $R\lim$ is taken in $D(\mathcal{O}_X)$.
In fact, let's write $K = R\lim \mathcal{F}_n$ for this.
For any affine $U$ \'etale over $X$ we have
$$
H^i(U, K) =
H^i(R\Gamma(U, R\lim \mathcal{F}_n)) =
H^i(R\lim R\Gamma(U, \mathcal{F}_n)) =
H^i(R\lim \Gamma(U, \mathcal{F}_n))
$$
since cohomology commutes with derived limits and since
the quasi-coherent sheaves
$\mathcal{F}_n$ have no higher cohomology on affines.
By the computation of $R\lim$ in the category of
abelian groups, we see that $H^i(U, K) = 0$
unless $i \in [0, 1]$. Then finally we conclude that
the $R\lim$ in $D_\QCoh(\mathcal{O}_X)$, which is
$DQ_X(K)$ by the above, is in $D^b_\QCoh(\mathcal{O}_X)$
and has vanishing cohomology sheaves in negative degrees
by Lemma \ref{lemma-boundedness-better-coherator}.
\end{example}










\section{Cohomology and base change, IV}
\label{section-cohomology-and-base-change-perfect}

\noindent
This section is the analogue of Derived Categories of Schemes, Section
\ref{perfect-section-cohomology-and-base-change-perfect}.

\begin{lemma}
\label{lemma-cohomology-base-change}
Let $S$ be a scheme. Let $f : X \to Y$ be a quasi-compact and quasi-separated
morphism of algebraic spaces over $S$. For $E$ in
$D_\QCoh(\mathcal{O}_X)$ and
$K$ in $D_\QCoh(\mathcal{O}_Y)$ we have
$$
Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} K =
Rf_*(E \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*K)
$$
\end{lemma}

\begin{proof}
Without any assumptions there is a map
$Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} K \to
Rf_*(E \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*K)$.
Namely, it is the adjoint to the canonical map
$$
Lf^*(Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} K) =
Lf^*(Rf_*(E)) \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*K
\longrightarrow
E \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*K
$$
coming from the map $Lf^*Rf_*E \to E$. See
Cohomology on Sites, Lemmas
\ref{sites-cohomology-lemma-pullback-tensor-product} and
\ref{sites-cohomology-lemma-adjoint}.
To check it is an isomorphism we may work \'etale locally on $Y$.
Hence we reduce to the case that $Y$ is an affine scheme.

\medskip\noindent
Suppose that $K = \bigoplus K_i$ is a direct
sum of some complexes $K_i \in D_\QCoh(\mathcal{O}_Y)$.
If the statement holds for each $K_i$, then it holds for $K$.
Namely, the functors $Lf^*$ and $\otimes^\mathbf{L}$ preserve
direct sums by construction and $Rf_*$ commutes with direct sums
(for complexes with quasi-coherent cohomology sheaves) by
Lemma \ref{lemma-quasi-coherence-pushforward-direct-sums}.
Moreover, suppose that $K \to L \to M \to K[1]$ is a distinguished
triangle in $D_\QCoh(Y)$. Then if the statement of the
lemma holds for two of $K, L, M$, then it holds for the third
(as the functors involved are exact functors of triangulated categories).

\medskip\noindent
Assume $Y$ affine, say $Y = \Spec(A)$. The functor
$\widetilde{\ } : D(A) \to D_\QCoh(\mathcal{O}_Y)$ is an equivalence
by
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} and
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-affine-compare-bounded}.
Let $T$ be the property for $K \in D(A)$ that
the statement of the lemma holds for $\widetilde{K}$.
The discussion above and
More on Algebra, Remark \ref{more-algebra-remark-P-resolution}
shows that it suffices to prove $T$ holds for $A[k]$.
This finishes the proof, as the statement of the lemma
is clear for shifts of the structure sheaf.
\end{proof}

\begin{definition}
\label{definition-tor-independent}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $X$, $Y$ be algebraic spaces over $B$. We say $X$ and
$Y$ are {\it Tor independent over $B$} if and only if for every
commutative diagram
$$
\xymatrix{
\Spec(k) \ar[d]_{\overline{y}} \ar[dr]_{\overline{b}} \ar[r]_-{\overline{x}} &
X \ar[d] \\
Y \ar[r] & B
}
$$
of geometric points the rings
$\mathcal{O}_{X, \overline{x}}$ and $\mathcal{O}_{Y, \overline{y}}$
are Tor independent over $\mathcal{O}_{B, \overline{b}}$ (see
More on Algebra, Definition \ref{more-algebra-definition-tor-independent}).
\end{definition}

\noindent
The following lemma shows in particular that this definition agrees
with our definition in the case of representable algebraic spaces.

\begin{lemma}
\label{lemma-tor-independent}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $X$, $Y$ be algebraic spaces over $B$. The following are equivalent
\begin{enumerate}
\item $X$ and $Y$ are Tor independent over $B$,
\item for every commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & W \ar[d] & V \ar[d] \ar[l] \\
X \ar[r] & B & Y \ar[l]
}
$$
with \'etale vertical arrows $U$ and $V$ are Tor independent over $W$,
\item for some commutative diagram as in (2) with (a) $W \to B$ \'etale
surjective, (b) $U \to X \times_B W$ \'etale surjective, (c)
$V \to Y \times_B W$ \'etale surjective, the spaces $U$ and $V$ are Tor
independent over $W$, and
\item for some commutative diagram as in (3) with $U$, $V$, $W$ schemes,
the schemes $U$ and $V$ are Tor independent over $W$ in the sense of
Derived Categories of Schemes, Definition
\ref{perfect-definition-tor-independent}.
\end{enumerate}
\end{lemma}

\begin{proof}
For an \'etale morphism $\varphi : U \to X$ of algebraic spaces
and geometric point $\overline{u}$ the map of local rings
$\mathcal{O}_{X, \varphi(\overline{u})} \to \mathcal{O}_{U, \overline{u}}$
is an isomorphism. Hence the equivalence of (1) and (2) follows.
So does the implication (1) $\Rightarrow$ (3). Assume (3) and
pick a diagram of geometric points as in
Definition \ref{definition-tor-independent}.
The assumptions imply that we can first lift $\overline{b}$ to a geometric
point $\overline{w}$ of $W$, then lift the geometric point
$(\overline{x}, \overline{b})$ to a geometric point $\overline{u}$ of $U$,
and finally lift the geometric point
$(\overline{y}, \overline{b})$ to a geometric point $\overline{v}$ of $V$.
Use Properties of Spaces, Lemma
\ref{spaces-properties-lemma-geometric-lift-to-usual}
to find the lifts.
Using the remark on local rings above we conclude that the condition
of the definition is satisfied for the given diagram.

\medskip\noindent
Having made these initial points, it is clear that (4) comes down to the
statement that
Definition \ref{definition-tor-independent}
agrees with
Derived Categories of Schemes, Definition
\ref{perfect-definition-tor-independent}
when $X$, $Y$, and $B$ are schemes.

\medskip\noindent
Let $\overline{x}, \overline{b}, \overline{y}$ be as in
Definition \ref{definition-tor-independent} lying over the points
$x, y, b$. Recall that
$\mathcal{O}_{X, \overline{x}} = \mathcal{O}_{X, x}^{sh}$
(Properties of Spaces, Lemma
\ref{spaces-properties-lemma-describe-etale-local-ring}) and similarly
for the other two. By Algebra, Lemma
\ref{algebra-lemma-strictly-henselian-functorial-improve} we see that
$\mathcal{O}_{X, \overline{x}}$ is a strict henselization of
$\mathcal{O}_{X, x} \otimes_{\mathcal{O}_{B, b}} \mathcal{O}_{B, \overline{b}}$.
In particular, the ring map
$$
\mathcal{O}_{X, x} \otimes_{\mathcal{O}_{B, b}} \mathcal{O}_{B, \overline{b}}
\longrightarrow
\mathcal{O}_{X, \overline{x}}
$$
is flat (More on Algebra, Lemma
\ref{more-algebra-lemma-dumb-properties-henselization}). By
More on Algebra, Lemma \ref{more-algebra-lemma-tor-independent-flat}
we see that
$$
\text{Tor}_i^{\mathcal{O}_{B, b}}(\mathcal{O}_{X, x}, \mathcal{O}_{Y, y})
\otimes_{\mathcal{O}_{X, x} \otimes_{\mathcal{O}_{B, b}} \mathcal{O}_{Y, y}}
(\mathcal{O}_{X, \overline{x}} \otimes_{\mathcal{O}_{B, \overline{b}}}
\mathcal{O}_{Y, \overline y})
=
\text{Tor}_i^{\mathcal{O}_{B, \overline{b}}}(
\mathcal{O}_{X, \overline{x}}, \mathcal{O}_{Y, \overline{y}})
$$
Hence it follows that if $X$ and $Y$ are Tor independent over $B$
as schemes, then $X$ and $Y$ are Tor independent as algebraic spaces over $B$.

\medskip\noindent
For the converse, we may assume $X$, $Y$, and $B$ are affine.
Observe that the ring map
$$
\mathcal{O}_{X, x} \otimes_{\mathcal{O}_{B, b}} \mathcal{O}_{Y, y}
\longrightarrow
\mathcal{O}_{X, \overline{x}} \otimes_{\mathcal{O}_{B, \overline{b}}}
\mathcal{O}_{Y, \overline y}
$$
is flat by the observations given above. Moreover, the image of the map
on spectra includes all primes
$\mathfrak s \subset
\mathcal{O}_{X, x} \otimes_{\mathcal{O}_{B, b}} \mathcal{O}_{Y, y}$
lying over $\mathfrak m_x$ and $\mathfrak m_y$.
Hence from this and the displayed formula of Tor's above we see that if
$X$ and $Y$ are Tor independent over $B$ as algebraic spaces, then
$$
\text{Tor}_i^{\mathcal{O}_{B, b}}
(\mathcal{O}_{X, x}, \mathcal{O}_{Y, y})_\mathfrak s = 0
$$
for all $i > 0$ and all $\mathfrak s$ as above. By
More on Algebra, Lemma \ref{more-algebra-lemma-tor-independent}
applied to the ring maps
$\Gamma(B, \mathcal{O}_B) \to \Gamma(X, \mathcal{O}_X)$
and
$\Gamma(B, \mathcal{O}_B) \to \Gamma(X, \mathcal{O}_X)$
this implies that $X$ and $Y$ are Tor independent over $B$.
\end{proof}

\begin{lemma}
\label{lemma-compare-base-change}
Let $S$ be a scheme. Let $g : Y' \to Y$ be a morphism of algebraic spaces over
$S$. Let $f : X \to Y$ be a quasi-compact and quasi-separated morphism of
algebraic spaces over $S$. Consider the base change diagram
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} &
X \ar[d]^f \\
Y' \ar[r]^g &
Y
}
$$
If $X$ and $Y'$ are Tor independent over $Y$, then for all
$E \in D_\QCoh(\mathcal{O}_X)$ we have
$Rf'_*L(g')^*E = Lg^*Rf_*E$.
\end{lemma}

\begin{proof}
For any object $E$ of $D(\mathcal{O}_X)$ we can use
Cohomology on Sites, Remark \ref{sites-cohomology-remark-base-change}
to get a canonical base change map $Lg^*Rf_*E \to Rf'_*L(g')^*E$. To check this
is an isomorphism we may work \'etale locally on $Y'$. Hence we may assume
$g : Y' \to Y$ is a morphism of affine schemes. In particular, $g$
is affine and it suffices to show that
$$
Rg_*Lg^*Rf_*E \to Rg_*Rf'_*L(g')^*E = Rf_*(Rg'_* L(g')^* E)
$$
is an isomorphism, see Lemma \ref{lemma-affine-morphism}
(and use Lemmas \ref{lemma-quasi-coherence-pullback},
\ref{lemma-quasi-coherence-tensor-product}, and
\ref{lemma-quasi-coherence-direct-image}
to see that the objects $Rf'_*L(g')^*E$ and $Lg^*Rf_*E$
have quasi-coherent cohomology sheaves). Note that $g'$ is
affine as well (Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-affine}).
By Lemma \ref{lemma-affine-morphism-pull-push} the map becomes a map
$$
Rf_*E \otimes_{\mathcal{O}_Y}^\mathbf{L} g_*\mathcal{O}_{Y'}
\longrightarrow
Rf_*(E \otimes_{\mathcal{O}_X}^\mathbf{L} g'_*\mathcal{O}_{X'})
$$
Observe that $g'_*\mathcal{O}_{X'} = f^*g_*\mathcal{O}_{Y'}$. Thus by
Lemma \ref{lemma-cohomology-base-change} it suffices to prove that
$Lf^*g_*\mathcal{O}_{Y'} = f^*g_*\mathcal{O}_{Y'}$. This follows from our
assumption that $X$ and $Y'$ are Tor independent over $Y$. Namely, to
check it we may work \'etale locally on $X$, hence we may also assume $X$
is affine. Say $X = \Spec(A)$, $Y = \Spec(R)$ and $Y' = \Spec(R')$.
Our assumption implies that $A$ and $R'$ are Tor independent over $R$
(see
Lemma \ref{lemma-tor-independent}
and
More on Algebra, Lemma \ref{more-algebra-lemma-tor-independent}), i.e.,
$\text{Tor}_i^R(A, R') = 0$ for $i > 0$. In other words
$A \otimes_R^\mathbf{L} R' = A \otimes_R R'$ which exactly means
that $Lf^*g_*\mathcal{O}_{Y'} = f^*g_*\mathcal{O}_{Y'}$.
\end{proof}

\noindent
The following lemma will be used in the chapter on dualizing complexes.

\begin{lemma}
\label{lemma-affine-morphism-and-hom-out-of-perfect}
Let $g : S' \to S$ be a morphism of affine schemes.
Consider a cartesian square
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} & X \ar[d]^f \\
S' \ar[r]^g & S
}
$$
of quasi-compact and quasi-separated algebraic spaces. Assume $g$ and $f$
Tor independent. Write $S = \Spec(R)$ and $S' = \Spec(R')$. For
$M, K \in D(\mathcal{O}_X)$ the canonical map
$$
R\Hom_X(M, K) \otimes^\mathbf{L}_R R'
\longrightarrow
R\Hom_{X'}(L(g')^*M, L(g')^*K)
$$
in $D(R')$ is an isomorphism in the following two cases
\begin{enumerate}
\item $M \in D(\mathcal{O}_X)$ is perfect and $K \in D_\QCoh(X)$, or
\item $M \in D(\mathcal{O}_X)$ is pseudo-coherent,
$K \in D_\QCoh^+(X)$, and $R'$ has finite tor dimension over $R$.
\end{enumerate}
\end{lemma}

\begin{proof}
There is a canonical map
$R\Hom_X(M, K) \to R\Hom_{X'}(L(g')^*M, L(g')^*K)$
in $D(\Gamma(X, \mathcal{O}_X))$ of global hom complexes, see
Cohomology on Sites, Section \ref{sites-cohomology-section-global-RHom}.
Restricting scalars we can view this as a map in $D(R)$.
Then we can use the adjointness of restriction and
$- \otimes_R^\mathbf{L} R'$ to get the displayed map of the lemma.
Having defined the map it suffices to prove it is an isomorphism
in the derived category of abelian groups.

\medskip\noindent
The right hand side is equal to
$$
R\Hom_X(M, R(g')_*L(g')^*K) =
R\Hom_X(M, K \otimes_{\mathcal{O}_X}^\mathbf{L} g'_*\mathcal{O}_{X'})
$$
by Lemma \ref{lemma-affine-morphism-pull-push}. In both cases the complex
$R\SheafHom(M, K)$ is an object of $D_\QCoh(\mathcal{O}_X)$ by
Lemma \ref{lemma-quasi-coherence-internal-hom}. There is a natural map
$$
R\SheafHom(M, K) \otimes_{\mathcal{O}_X}^\mathbf{L} g'_*\mathcal{O}_{X'}
\longrightarrow
R\SheafHom(M, K \otimes_{\mathcal{O}_X}^\mathbf{L} g'_*\mathcal{O}_{X'})
$$
which is an isomorphism in both cases
Lemma \ref{lemma-internal-hom-evaluate-tensor-isomorphism}.
To see that this lemma applies in case (2) we note that
$g'_*\mathcal{O}_{X'} = Rg'_*\mathcal{O}_{X'} =
Lf^*g_*\mathcal{O}_X$ the second equality by
Lemma \ref{lemma-compare-base-change}.
Using Derived Categories of Schemes, Lemma
\ref{perfect-lemma-tor-dimension-affine},
Lemma \ref{lemma-descend-tor-amplitude}, and
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-tor-amplitude-pullback}
we conclude that $g'_*\mathcal{O}_{X'}$ has finite Tor dimension.
Hence, in both cases by replacing $K$ by $R\SheafHom(M, K)$ we reduce
to proving
$$
R\Gamma(X, K) \otimes^\mathbf{L}_A A' \longrightarrow
R\Gamma(X, K \otimes^\mathbf{L}_{\mathcal{O}_X} g'_*\mathcal{O}_{X'})
$$
is an isomorphism.
Note that the left hand side is equal to $R\Gamma(X', L(g')^*K)$
by Lemma \ref{lemma-affine-morphism-pull-push}.
Hence the result follows from
Lemma \ref{lemma-compare-base-change}.
\end{proof}

\begin{remark}
\label{remark-multiplication-map}
With notation as in Lemma \ref{lemma-affine-morphism-and-hom-out-of-perfect}.
The diagram
$$
\xymatrix{
R\Hom_X(M, Rg'_*L) \otimes_R^\mathbf{L} R' \ar[r] \ar[d]_\mu &
R\Hom_{X'}(L(g')^*M, L(g')^*Rg'_*L) \ar[d]^a \\
R\Hom_X(M, R(g')_*L) \ar@{=}[r] &
R\Hom_{X'}(L(g')^*M, L)
}
$$
is commutative where the top horizontal arrow is the map from the lemma,
$\mu$ is the multiplication map, and $a$ comes from the adjunction map
$L(g')^*Rg'_*L \to L$. The multiplication map is the adjunction map
$K' \otimes_R^\mathbf{L} R' \to K'$ for any $K' \in D(R')$.
\end{remark}

\begin{lemma}
\label{lemma-tor-independence-and-tor-amplitude}
Let $S$ be a scheme. Consider a cartesian square of algebraic spaces
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} & X \ar[d]^f \\
Y' \ar[r]^g & Y
}
$$
over $S$. Assume $g$ and $f$ Tor independent.
\begin{enumerate}
\item If $E \in D(\mathcal{O}_X)$ has tor amplitude
in $[a, b]$ as a complex of $f^{-1}\mathcal{O}_Y$-modules,
then $L(g')^*E$ has tor amplitude
in $[a, b]$ as a complex of $f^{-1}\mathcal{O}_{Y'}$-modules.
\item If $\mathcal{G}$ is an $\mathcal{O}_X$-module flat
over $Y$, then $L(g')^*\mathcal{G} = (g')^*\mathcal{G}$.
\end{enumerate}
\end{lemma}

\begin{proof}
We can compute tor dimension at stalks, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-tor-amplitude-stalk}
and Properties of Spaces, Theorem
\ref{spaces-properties-theorem-exactness-stalks}.
If $\overline{x}'$ is a geometric point of $X'$ with image
$\overline{x}$ in $X$, then
$$
(L(g')^*E)_{\overline{x}'} =
E_{\overline{x}}
\otimes_{\mathcal{O}_{X, \overline{x}}}^\mathbf{L}
\mathcal{O}_{X', \overline{x}'}
$$
Let $\overline{y}'$ in $Y'$ and $\overline{y}$ in $Y$
be the image of $\overline{x}'$ and $\overline{x}$.
Since $X$ and $Y'$ are tor independent over $Y$, we can apply
More on Algebra, Lemma \ref{more-algebra-lemma-base-change-comparison}
to see that the right hand side of the displayed formula is equal to
$E_{\overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}^\mathbf{L}
\mathcal{O}_{Y', \overline{y}'}$
in $D(\mathcal{O}_{Y', \overline{y}'})$.
Thus (1) follows from
More on Algebra, Lemma \ref{more-algebra-lemma-pull-tor-amplitude}.
To see (2) observe that flatness of $\mathcal{G}$ is equivalent to
the condition that $\mathcal{G}[0]$ has tor amplitude in $[0, 0]$.
Applying (1) we conclude.
\end{proof}










\section{Cohomology and base change, V}
\label{section-cohomology-base-change}

\noindent
This section is the analogue of Derived Categories of Schemes, Section
\ref{perfect-section-cohomology-base-change}. In
Section \ref{section-cohomology-and-base-change-perfect}
we saw a base change theorem holds when the morphisms are tor independent.
Even in the affine case there cannot be a base change theorem without such
a condition, see
More on Algebra, Section \ref{more-algebra-section-tor-independence}.
In this section we analyze when one can get a base change result
``one complex at a time''.

\medskip\noindent
To make this work, let $S$ be a base scheme and
suppose we have a commutative diagram
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} &
X \ar[d]^f \\
Y' \ar[r]^g &
Y
}
$$
of algebraic spaces over $S$ (usually we will assume it is cartesian).
Let $K \in D_\QCoh(\mathcal{O}_X)$
and let $L(g')^*K \to K'$ be a map in $D_\QCoh(\mathcal{O}_{X'})$.
For a geometric point $\overline{x}'$ of $X'$ consider the geometric
points
$\overline{x} = g'(\overline{x}')$,
$\overline{y}' = f'(\overline{x}')$,
$\overline{y} = f(\overline{x}) = g(\overline{y}')$
of $X$, $Y'$, $Y$.
Then we can consider the maps
$$
K_{\overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}^\mathbf{L}
\mathcal{O}_{Y', \overline{y}'}
\to
K_{\overline{x}}
\otimes_{\mathcal{O}_{X, \overline{x}}}^\mathbf{L}
\mathcal{O}_{X', \overline{x}'} \to
K'_{\overline{x}'}
$$
where the first arrow is More on Algebra,
Equation (\ref{more-algebra-equation-comparison-map})
and the second comes from
$(L(g')^*K)_{\overline{x}'} =
K_{\overline{x}} \otimes_{\mathcal{O}_{X, \overline{x}}}^\mathbf{L}
\mathcal{O}_{X', \overline{x}'}$
and the given map $L(g')^*K \to K'$.
For each $i \in \mathbf{Z}$ we obtain a
$\mathcal{O}_{X, \overline{x}} \otimes_{\mathcal{O}_{Y, \overline{y}}}
\mathcal{O}_{Y', \overline{y}'}$-module structure on
$H^i(K_{\overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}^\mathbf{L}
\mathcal{O}_{Y', \overline{y}'})$.
Putting everything together we obtain canonical maps
\begin{equation}
\label{equation-bc}
H^i(K_{\overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}^\mathbf{L}
\mathcal{O}_{Y', \overline{y}'})
\otimes_{(\mathcal{O}_{X, \overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}
\mathcal{O}_{Y', \overline{y}'})}
\mathcal{O}_{X', \overline{x}'}
\longrightarrow
H^i(K'_{\overline{x}'})
\end{equation}
of $\mathcal{O}_{X', \overline{x}'}$-modules.

\begin{lemma}
\label{lemma-single-complex-base-change-condition}
Let $S$ be a scheme. Let
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} &
X \ar[d]^f \\
Y' \ar[r]^g &
Y
}
$$
be a cartesian diagram of algebraic spaces over $S$.
Let $K \in D_\QCoh(\mathcal{O}_X)$ and let $L(g')^*K \to K'$
be a map in $D_\QCoh(\mathcal{O}_{X'})$. The following are equivalent
\begin{enumerate}
\item for any $x' \in X'$ and $i \in \mathbf{Z}$ the map (\ref{equation-bc})
is an isomorphism,
\item for any commutative diagram
$$
\xymatrix{
& U \ar[d] \ar[rd]^a \\
V' \ar[r] \ar[rd]^c & V \ar[rd]^b & X \ar[d]^f \\
& Y' \ar[r]^g & Y
}
$$
with $a, b, c$ \'etale, $U, V, V'$ schemes, and with $U' = V' \times_V U$
the equivalent conditions of
Derived Categories of Schemes, Lemma
\ref{lemma-single-complex-base-change-condition}
hold for $(U \to X)^*K$ and $(U' \to X')^*K'$, and
\item there is some diagram as in (2) with $U' \to X'$ surjective.
\end{enumerate}
\end{lemma}

\begin{proof}
Observe that (1) is \'etale local on $X'$. Working through formal
implications of what is known, we see that it suffices to prove
condition (1) of this lemma is equivalent to condition
(1) of Derived Categories of Schemes, Lemma
\ref{perfect-lemma-single-complex-base-change-condition}
if $X, Y, Y', X'$ are representable by schemes
$X_0, Y_0, Y'_0, X'_0$. Denote $f_0, g_0, g'_0, f'_0$ the
morphisms between these schemes corresponding to $f, g, g', f'$.
We may assume $K = \epsilon^*K_0$ and $K' = \epsilon^*K'_0$
for some objects $K_0 \in D_\QCoh(\mathcal{O}_{X_0})$
and $K'_0 \in D_\QCoh(\mathcal{O}_{X'_0})$, see
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}.
Moreover, the map $Lg^*K \to K'$ is the pullback
of a map $L(g_0)^*K_0 \to K'_0$ with notation as in
Remark \ref{remark-match-total-direct-images}.
Recall that $\mathcal{O}_{X, \overline{x}}$ is the
strict henselization of $\mathcal{O}_{X, x}$
(Properties of Spaces, Lemma
\ref{spaces-properties-lemma-describe-etale-local-ring})
and that we have
$$
K_{\overline{x}} =
K_{0, x} \otimes_{\mathcal{O}_{X, x}}^\mathbf{L} \mathcal{O}_{X, \overline{x}}
\quad\text{and}\quad
K'_{\overline{x}'} =
K'_{0, x'} \otimes_{\mathcal{O}_{X', x'}}^\mathbf{L}
\mathcal{O}_{X', \overline{x}'}
$$
(akin to Properties of Spaces, Lemma
\ref{spaces-properties-lemma-stalk-quasi-coherent}).
Consider the commutative diagram
$$
\xymatrix{
H^i(K_{\overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}^\mathbf{L}
\mathcal{O}_{Y', \overline{y}'})
\otimes_{(\mathcal{O}_{X, \overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}
\mathcal{O}_{Y', \overline{y}'})}
\mathcal{O}_{X', \overline{x}'}
\ar[r] &
H^i(K'_{\overline{x}'}) \\
H^i(K_{0, x} \otimes_{\mathcal{O}_{Y, y}}^\mathbf{L} \mathcal{O}_{Y', y'})
\otimes_{(\mathcal{O}_{X, x} \otimes_{\mathcal{O}_{Y, y}} \mathcal{O}_{Y', y'})}
\mathcal{O}_{X', x'}
\ar[u] \ar[r] &
H^i(K'_{0, x'}) \ar[u]
}
$$
We have to show that the lower horizontal arrow is an isomorphism if and only
if the upper horizontal arrow is an isomorphism. Since
$\mathcal{O}_{X', x'} \to \mathcal{O}_{X', \overline{x}'}$
is faithfully flat (More on Algebra, Lemma
\ref{more-algebra-lemma-dumb-properties-henselization})
it suffices to show that the top arrow is the base
change of the bottom arrow by this map.
This follows immediately from the relationships between
stalks given above for the objects on the right.
For the objects on the left it suffices to show that
\begin{align*}
&
H^i\left(
(K_{0, x}
\otimes_{\mathcal{O}_{X, x}}^\mathbf{L} \mathcal{O}_{X, \overline{x}})
\otimes_{\mathcal{O}_{Y, \overline{y}}}^\mathbf{L}
\mathcal{O}_{Y', \overline{y}'}\right) \\
& =
H^i(K_{0, x} \otimes_{\mathcal{O}_{Y, y}}^\mathbf{L} \mathcal{O}_{Y', y'})
\otimes_{(\mathcal{O}_{X, x} \otimes_{\mathcal{O}_{Y, y}} \mathcal{O}_{Y', y'})}
(\mathcal{O}_{X, \overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}
\mathcal{O}_{Y', \overline{y}'})
\end{align*}
This follows from More on Algebra, Lemma
\ref{more-algebra-lemma-lemma-tor-independent-flat-compare}.
The flatness assumptions of this lemma hold by what was said
above as well as Algebra, Lemma
\ref{algebra-lemma-strictly-henselian-functorial-improve}
implying that
$\mathcal{O}_{X, \overline{x}}$ is the strict henselization of
$\mathcal{O}_{X, x} \otimes_{\mathcal{O}_{Y, y}}
\mathcal{O}_{Y, \overline{y}}$
and that
$\mathcal{O}_{Y', \overline{y}'}$ is the strict henselization of
$\mathcal{O}_{Y', y'} \otimes_{\mathcal{O}_{Y, y}}
\mathcal{O}_{Y, \overline{y}}$.
\end{proof}

\begin{lemma}
\label{lemma-single-complex-base-change}
Let $S$ be a scheme. Let
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} &
X \ar[d]^f \\
Y' \ar[r]^g &
Y
}
$$
be a cartesian diagram of algebraic spaces over $S$.
Let $K \in D_\QCoh(\mathcal{O}_X)$ and let $L(g')^*K \to K'$
be a map in $D_\QCoh(\mathcal{O}_{X'})$. If
\begin{enumerate}
\item the equivalent conditions of
Lemma \ref{lemma-single-complex-base-change-condition} hold, and
\item $f$ is quasi-compact and quasi-separated,
\end{enumerate}
then the composition $Lg^*Rf_*K \to Rf'_*L(g')^*K \to Rf'_*K'$
is an isomorphism.
\end{lemma}

\begin{proof}
To check the map is an isomorphism we may work \'etale locally on $Y'$.
Hence we may assume $g : Y' \to Y$ is a morphism of affine schemes.
In this case, we will use the induction principle of
Lemma \ref{lemma-induction-principle}
to prove that for a quasi-compact and quasi-separated
algebraic space $U$ \'etale over $X$
the similarly constructed map
$Lg^*R(U \to Y)_*K|_U \to R(U' \to Y')_*K'|_{U'}$
is an isomorphism. Here $U' = X' \times_{g', X} U = Y' \times_{g, Y} U$.

\medskip\noindent
If $U$ is a scheme (for example affine), then the result holds.
Namely, then $Y, Y', U, U'$ are schemes, $K$ and $K'$ come from
objects of the derived category of the underlying schemes by
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}
and the condition of
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-single-complex-base-change-condition}
holds for these complexes by
Lemma \ref{lemma-single-complex-base-change-condition}.
Thus (by the compatibilities explained in
Remark \ref{remark-match-total-direct-images})
we can apply the result in the case of schemes
which is
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-single-complex-base-change}.

\medskip\noindent
The induction step. Let $(U \subset W, V \to W)$ be an elementary
distinguished square with $W$ a quasi-compact and quasi-separated
algebraic space \'etale over $X$, with $U$ quasi-compact, $V$ affine
and the result holds for $U$, $V$, and $U \times_W V$.
To easy notation we replace $W$ by $X$ (this is permissible at this point).
Denote $a : U \to Y$, $b : V \to Y$, and $c : U \times_X V \to Y$
the obvious morphisms. Let $a' : U' \to Y'$, $b' : V' \to Y'$
and $c' : U' \times_{X'} V' \to Y'$ be the base changes of $a$, $b$, and $c$.
Using the distinguished triangles from relative Mayer-Vietoris
(Lemma \ref{lemma-unbounded-relative-mayer-vietoris})
we obtain a commutative diagram
$$
\xymatrix{
Lg^*Rf_*K \ar[r] \ar[d] & Rf'_*K' \ar[d] \\
Lg^*Ra_*K|_U \oplus Lg^*Rb_*K|_V \ar[r] \ar[d] &
Ra'_* K'|_{U'} \oplus Rb'_* K'|_{V'} \ar[d] \\
Lg^*Rc_*K|_{U \times_X V} \ar[r] \ar[d] &
Rc'_*K'|_{U' \times_{X'} V'} \ar[d] \\
Lg^*Rf_* K[1] \ar[r] &
Rf'_* K'[1]
}
$$
Since the 2nd and 3rd horizontal arrows are isomorphisms so is the first
(Derived Categories, Lemma \ref{derived-lemma-third-isomorphism-triangle})
and the proof of the lemma is finished.
\end{proof}

\begin{lemma}
\label{lemma-single-complex-base-change-condition-inherited}
Let $S$ be a scheme. Let
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} &
X \ar[d]^f \\
S' \ar[r]^g &
S
}
$$
be a cartesian diagram of algebraic spaces over $S$.
Let $K \in D_\QCoh(\mathcal{O}_X)$ and let $L(g')^*K \to K'$
be a map in $D_\QCoh(\mathcal{O}_{X'})$. If the equivalent conditions of
Lemma \ref{lemma-single-complex-base-change-condition} hold, then
\begin{enumerate}
\item for $E \in D_\QCoh(\mathcal{O}_X)$ the equivalent
conditions of Lemma \ref{lemma-single-complex-base-change-condition} hold
for $L(g')^*(E \otimes^\mathbf{L} K) \to L(g')^*E \otimes^\mathbf{L} K'$,
\item if $E$ in $D(\mathcal{O}_X)$ is perfect the equivalent conditions of
Lemma \ref{lemma-single-complex-base-change-condition} hold for
$L(g')^*R\SheafHom(E, K) \to R\SheafHom(L(g')^*E, K')$, and
\item if $K$ is bounded below and $E$ in $D(\mathcal{O}_X)$
pseudo-coherent the equivalent conditions of
Lemma \ref{lemma-single-complex-base-change-condition} hold for
$L(g')^*R\SheafHom(E, K) \to R\SheafHom(L(g')^*E, K')$.
\end{enumerate}
\end{lemma}

\begin{proof}
The statement makes sense as the complexes involved have quasi-coherent
cohomology sheaves by Lemmas
\ref{lemma-quasi-coherence-pullback},
\ref{lemma-quasi-coherence-tensor-product}, and
\ref{lemma-quasi-coherence-internal-hom} and
Cohomology on Sites, Lemmas
\ref{sites-cohomology-lemma-pseudo-coherent-pullback} and
\ref{sites-cohomology-lemma-perfect-pullback}.
Having said this, we can check the maps (\ref{equation-bc})
are isomorphisms in case (1) by computing the source and target
of (\ref{equation-bc}) using the transitive property of tensor product, see
More on Algebra, Lemma \ref{more-algebra-lemma-triple-tensor-product}.
The map in (2) and (3) is the composition
$$
L(g')^*R\SheafHom(E, K) \to R\SheafHom(L(g')^*E, L(g')^*K)
\to R\SheafHom(L(g')^*E, K')
$$
where the first arrow is
Cohomology on Sites, Remark
\ref{sites-cohomology-remark-prepare-fancy-base-change}
and the second arrow comes from the given map $L(g')^*K \to K'$.
To prove the maps (\ref{equation-bc}) are isomorphisms one represents
$E_x$ by a bounded complex of finite projective $\mathcal{O}_{X. x}$-modules
in case (2) or by a bounded above complex of finite free modules in case (3)
and computes the source and target of the arrow.
Some details omitted.
\end{proof}

\begin{lemma}
\label{lemma-base-change-tensor}
Let $S$ be a scheme. Let $f : X \to Y$ be a quasi-compact and
quasi-separated morphism of algebraic spaces over $S$.
Let $E \in D_\QCoh(\mathcal{O}_X)$.
Let $\mathcal{G}^\bullet$ be a bounded above complex of
quasi-coherent $\mathcal{O}_X$-modules flat over $Y$.
Then formation of
$$
Rf_*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet)
$$
commutes with arbitrary base change (see proof for precise statement).
\end{lemma}

\begin{proof}
The statement means the following. Let $g : Y' \to Y$ be a morphism of
algebraic spaces and consider the base change diagram
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} &
X \ar[d]^f \\
Y' \ar[r]^g &
Y
}
$$
in other words $X' = Y' \times_Y X$. The lemma asserts that
$$
Lg^*Rf_*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet)
\longrightarrow
Rf'_*(L(g')^*E \otimes^\mathbf{L}_{\mathcal{O}_{X'}} (g')^*\mathcal{G}^\bullet)
$$
is an isomorphism. Observe that on the right hand side we do {\bf not}
use derived pullback on $\mathcal{G}^\bullet$.
To prove this, we apply Lemmas \ref{lemma-single-complex-base-change} and
\ref{lemma-single-complex-base-change-condition-inherited} to see that it
suffices to prove the canonical map
$$
L(g')^*\mathcal{G}^\bullet \to (g')^*\mathcal{G}^\bullet
$$
satisfies the equivalent conditions of
Lemma \ref{lemma-single-complex-base-change-condition}.
This follows by checking the condition on stalks, where it
immediately follows from the fact that
$\mathcal{G}^\bullet_{\overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}
\mathcal{O}_{Y', \overline{y}'}$
computes the derived tensor product by our assumptions on the complex
$\mathcal{G}^\bullet$.
\end{proof}

\begin{lemma}
\label{lemma-base-change-RHom}
Let $S$ be a scheme. Let $f : X \to Y$ be a quasi-compact and
quasi-separated morphism of algebraic spaces over $S$. Let $E$
be an object of $D(\mathcal{O}_X)$. Let $\mathcal{G}^\bullet$
be a complex of quasi-coherent $\mathcal{O}_X$-modules. If
\begin{enumerate}
\item $E$ is perfect, $\mathcal{G}^\bullet$ is a bounded above,
and $\mathcal{G}^n$ is flat over $Y$, or
\item $E$ is pseudo-coherent, $\mathcal{G}^\bullet$ is bounded,
and $\mathcal{G}^n$ is flat over $Y$,
\end{enumerate}
then formation of
$$
Rf_*R\SheafHom(E, \mathcal{G}^\bullet)
$$
commutes with arbitrary base change (see proof for precise statement).
\end{lemma}

\begin{proof}
The statement means the following. Let $g : Y' \to Y$ be a morphism of
algebraic spaces and consider the base change diagram
$$
\xymatrix{
X' \ar[r]_h \ar[d]_{f'} &
X \ar[d]^f \\
Y' \ar[r]^g &
Y
}
$$
in other words $X' = Y' \times_Y X$. The lemma asserts that
$$
Lg^*Rf_*R\SheafHom(E, \mathcal{G}^\bullet)
\longrightarrow
R(f')_*R\SheafHom(L(g')^*E, (g')^*\mathcal{G}^\bullet)
$$
is an isomorphism. Observe that on the right hand side we do {\bf not}
use the derived pullback on $\mathcal{G}^\bullet$. To prove this, we apply
Lemmas \ref{lemma-single-complex-base-change} and
\ref{lemma-single-complex-base-change-condition-inherited} to see that it
suffices to prove the canonical map
$$
L(g')^*\mathcal{G}^\bullet \to (g')^*\mathcal{G}^\bullet
$$
satisfies the equivalent conditions of
Lemma \ref{lemma-single-complex-base-change-condition}.
This was shown in the proof of Lemma \ref{lemma-base-change-tensor}.
\end{proof}















\section{Producing perfect complexes}
\label{section-producing-perfect}

\noindent
The following lemma is our main technical tool for producing
perfect complexes. Later versions of this result will reduce to
this by Noetherian approximation.

\begin{lemma}
\label{lemma-perfect-direct-image}
Let $S$ be a scheme. Let $Y$ be a Noetherian algebraic space over $S$.
Let $f : X \to Y$ be a morphism of algebraic spaces which is locally of
finite type and quasi-separated. Let $E \in D(\mathcal{O}_X)$ such that
\begin{enumerate}
\item $E \in D^b_{\textit{Coh}}(\mathcal{O}_X)$,
\item the support of $H^i(E)$ is proper over $Y$ for all $i$,
\item $E$ has finite tor dimension as an object of $D(f^{-1}\mathcal{O}_Y)$.
\end{enumerate}
Then $Rf_*E$ is a perfect object of $D(\mathcal{O}_Y)$.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-direct-image-coherent} we see that $Rf_*E$ is an object of
$D^b_{\textit{Coh}}(\mathcal{O}_Y)$. Hence $Rf_*E$ is pseudo-coherent
(Lemma \ref{lemma-identify-pseudo-coherent-noetherian}).
Hence it suffices to show that $Rf_*E$ has finite tor dimension, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-perfect}.
By Lemma \ref{lemma-tor-qc-qs} it suffices to check that
$Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} \mathcal{F}$
has universally bounded cohomology for all quasi-coherent
sheaves $\mathcal{F}$ on $Y$. Bounded from above is clear as $Rf_*(E)$
is bounded from above. Let $T \subset |X|$ be the union of the supports
of $H^i(E)$ for all $i$. Then $T$ is proper over $Y$ by assumptions (1)
and (2) and Lemma \ref{lemma-union-closed-proper-over-base}.
In particular there exists a quasi-compact open subspace
$X' \subset X$ containing $T$. Setting $f' = f|_{X'}$ we have
$Rf_*(E) = Rf'_*(E|_{X'})$ because $E$ restricts to zero on $X \setminus T$.
Thus we may replace $X$ by $X'$ and assume $f$ is quasi-compact.
We have assumed $f$ is quasi-separated. Thus
$$
Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} \mathcal{F} =
Rf_*\left(E \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*\mathcal{F}\right) =
Rf_*\left(E \otimes_{f^{-1}\mathcal{O}_Y}^\mathbf{L} f^{-1}\mathcal{F}\right)
$$
by
Lemma \ref{lemma-cohomology-base-change}
and
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-variant-derived-pullback}.
By assumption (3) the complex
$E \otimes_{f^{-1}\mathcal{O}_Y}^\mathbf{L} f^{-1}\mathcal{F}$
has cohomology sheaves in a
given finite range, say $[a, b]$. Then $Rf_*$ of it
has cohomology in the range $[a, \infty)$ and we win.
\end{proof}

\begin{lemma}
\label{lemma-tensor-perfect}
Let $S$ be a scheme. Let $B$ be a Noetherian algebraic space over $S$.
Let $f : X \to B$ be a morphism of algebraic spaces which is locally of
finite type and quasi-separated. Let $E \in D(\mathcal{O}_X)$ be perfect.
Let $\mathcal{G}^\bullet$ be a bounded complex of coherent
$\mathcal{O}_X$-modules flat over $B$ with support proper over $B$. Then
$K = Rf_*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet)$
is a perfect object of $D(\mathcal{O}_B)$.
\end{lemma}

\begin{proof}
The object $K$ is perfect by Lemma \ref{lemma-perfect-direct-image}.
We check the lemma applies: Locally $E$ is isomorphic to a finite complex
of finite free $\mathcal{O}_X$-modules. Hence locally
$E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet$ is isomorphic
to a finite complex whose terms are of the form
$$
\bigoplus\nolimits_{i = a, \ldots, b} (\mathcal{G}^i)^{\oplus r_i}
$$
for some integers $a, b, r_a, \ldots, r_b$. This immediately implies the
cohomology sheaves $H^i(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G})$
are coherent. The hypothesis on the tor dimension also follows as
$\mathcal{G}^i$ is flat over $f^{-1}\mathcal{O}_Y$.
\end{proof}

\begin{lemma}
\label{lemma-ext-perfect}
Let $S$ be a scheme. Let $B$ be a Noetherian algebraic space over $S$.
Let $f : X \to B$ be a morphism of algebraic spaces which is locally of
finite type and quasi-separated. Let $E \in D(\mathcal{O}_X)$ be perfect.
Let $\mathcal{G}^\bullet$ be a bounded complex of coherent
$\mathcal{O}_X$-modules flat over $B$ with support proper over $B$. Then
$K = Rf_*R\SheafHom(E, \mathcal{G})$ is a perfect object of $D(\mathcal{O}_B)$.
\end{lemma}

\begin{proof}
Since $E$ is a perfect complex there exists a dual perfect complex
$E^\vee$, see Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-dual-perfect-complex}.
Observe that $R\SheafHom(E, \mathcal{G}^\bullet) =
E^\vee \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet$.
Thus the perfectness of $K$ follows from Lemma \ref{lemma-tensor-perfect}.
\end{proof}






\section{A projection formula for Ext}
\label{section-ext}

\noindent
Lemma \ref{lemma-compute-ext} (or similar results in the literature)
is sometimes useful to verify properties of an obstruction theory needed
to verify one of Artin's criteria
for Quot functors, Hilbert schemes, and other moduli problems.
Suppose that $f : X \to Y$ is a proper, flat, finitely presented
morphism of algebraic spaces and $E \in D(\mathcal{O}_X)$ is perfect.
Here the lemma says
$$
\Ext^i_X(E, f^*\mathcal{F}) =
\Ext^i_Y((Rf_*E^\vee)^\vee, \mathcal{F})
$$
for $\mathcal{F}$ quasi-coherent on $Y$.
Writing it this way makes it look like a projection formula
for Ext and indeed the result follows rather
easily from Lemma \ref{lemma-cohomology-base-change}.

\begin{lemma}
\label{lemma-compute-tensor-perfect}
Assumptions and notation as in Lemma \ref{lemma-tensor-perfect}.
Then there are functorial isomorphisms
$$
H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F})
\longrightarrow
H^i(X, E \otimes^\mathbf{L}_{\mathcal{O}_X}
(\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}))
$$
for $\mathcal{F}$ quasi-coherent on $B$
compatible with boundary maps (see proof).
\end{lemma}

\begin{proof}
We have
$$
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*\mathcal{F} =
\mathcal{G}^\bullet \otimes_{f^{-1}\mathcal{O}_B}^\mathbf{L} f^{-1}\mathcal{F} =
\mathcal{G}^\bullet \otimes_{f^{-1}\mathcal{O}_B} f^{-1}\mathcal{F} =
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}
$$
the first equality by
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-variant-derived-pullback},
the second as $\mathcal{G}^n$ is a flat $f^{-1}\mathcal{O}_B$-module, and
the third by definition of pullbacks. Hence we obtain
\begin{align*}
H^i(X, E \otimes^\mathbf{L}_{\mathcal{O}_X}
(\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}))
& =
H^i(X, E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet
\otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*\mathcal{F}) \\
& =
H^i(B,
Rf_*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet
\otimes^\mathbf{L}_{\mathcal{O}_X} Lf^*\mathcal{F})) \\
& =
H^i(B,
Rf_*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet)
\otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}) \\
& =
H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F})
\end{align*}
The first equality by the above, the second by Leray
(Cohomology on Sites, Remark \ref{sites-cohomology-remark-before-Leray}), and
the third equality by Lemma \ref{lemma-cohomology-base-change}.
The statement on boundary maps means the following: Given a short
exact sequence $0 \to \mathcal{F}_1 \to \mathcal{F}_2 \to \mathcal{F}_3 \to 0$
then the isomorphisms fit into commutative diagrams
$$
\xymatrix{
H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_3)
\ar[r] \ar[d]_\delta &
H^i(X, E \otimes^\mathbf{L}_{\mathcal{O}_X}
(\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_3)) \ar[d]^\delta \\
H^{i + 1}(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1)
\ar[r] &
H^{i + 1}(X, E \otimes^\mathbf{L}_{\mathcal{O}_X}
(\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_1))
}
$$
where the boundary maps come from the distinguished triangle
$$
K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1 \to
K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_2 \to
K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_3 \to
K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1[1]
$$
and the distinguished triangle in $D(\mathcal{O}_X)$ associated to
the short exact sequence
$$
0 \to
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_1 \to
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_2 \to
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_3 \to 0
$$
of complexes.
This sequence is exact because $\mathcal{G}^n$ is flat over $B$.
We omit the verification of the commutativity of the displayed diagram.
\end{proof}

\begin{lemma}
\label{lemma-compute-ext-perfect}
Assumption and notation as in Lemma \ref{lemma-ext-perfect}.
Then there are functorial isomorphisms
$$
H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F})
\longrightarrow
\Ext^i_{\mathcal{O}_X}(E,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
$$
for $\mathcal{F}$ quasi-coherent on $B$
compatible with boundary maps (see proof).
\end{lemma}

\begin{proof}
As in the proof of Lemma \ref{lemma-ext-perfect} let
$E^\vee$ be the dual perfect complex and recall that
$K = Rf_*(E^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{G}^\bullet)$.
Since we also have
$$
\Ext^i_{\mathcal{O}_X}(E,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
=
H^i(X, E^\vee \otimes^\mathbf{L}_{\mathcal{O}_X}
(\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}))
$$
by construction of $E^\vee$, the existence of the isomorphisms
follows from Lemma \ref{lemma-compute-tensor-perfect} applied to $E^\vee$
and $\mathcal{G}^\bullet$.
The statement on boundary maps means the following: Given a short
exact sequence $0 \to \mathcal{F}_1 \to \mathcal{F}_2 \to \mathcal{F}_3 \to 0$
then the isomorphisms fit into commutative diagrams
$$
\xymatrix{
H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_3)
\ar[r] \ar[d]_\delta &
\Ext^i_{\mathcal{O}_X}(E,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_3) \ar[d]^\delta \\
H^{i + 1}(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1)
\ar[r] &
\Ext^{i + 1}_{\mathcal{O}_X}(E,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_1)
}
$$
where the boundary maps come from the distinguished triangle
$$
K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1 \to
K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_2 \to
K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_3 \to
K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1[1]
$$
and the distinguished triangle in $D(\mathcal{O}_X)$ associated to
the short exact sequence
$$
0 \to
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_1 \to
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_2 \to
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_3 \to 0
$$
of complexes.
This sequence is exact because $\mathcal{G}^n$ is flat over $B$.
We omit the verification of the commutativity of the displayed diagram.
\end{proof}

\begin{lemma}
\label{lemma-compute-ext}
Let $S$ be a scheme. Let $f : X \to B$ be a morphism of algebraic spaces
over $S$, $E \in D(\mathcal{O}_X)$, and $\mathcal{F}^\bullet$ a complex
of $\mathcal{O}_X$-modules. Assume
\begin{enumerate}
\item $B$ is Noetherian,
\item $f$ is locally of finite type and quasi-separated,
\item $E \in D^-_{\textit{Coh}}(\mathcal{O}_X)$,
\item $\mathcal{G}^\bullet$ is a bounded complex of coherent
$\mathcal{O}_X$-module flat over $B$ with support proper over $B$.
\end{enumerate}
Then the following two statements are true
\begin{enumerate}
\item[(A)] for every $m \in \mathbf{Z}$ there exists a perfect object $K$
of $D(\mathcal{O}_B)$ and functorial maps
$$
\alpha^i_\mathcal{F} :
\Ext^i_{\mathcal{O}_X}(E,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
\longrightarrow
H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F})
$$
for $\mathcal{F}$ quasi-coherent on $B$
compatible with boundary maps (see proof)
such that $\alpha^i_\mathcal{F}$ is an isomorphism for $i \leq m$, and
\item[(B)] there exists a pseudo-coherent $L \in D(\mathcal{O}_B)$
and functorial isomorphisms
$$
\Ext^i_{\mathcal{O}_B}(L, \mathcal{F}) \longrightarrow
\Ext^i_{\mathcal{O}_X}(E,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
$$
for $\mathcal{F}$ quasi-coherent on $B$ compatible with boundary maps.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (A). Suppose $\mathcal{G}^i$ is nonzero only for $i \in [a, b]$.
We may replace $X$ by a quasi-compact open neighbourhood of the union
of the supports of $\mathcal{G}^i$. Hence we may assume $X$ is Noetherian.
In this case $X$ and $f$ are quasi-compact and quasi-separated.
Choose an approximation $P \to E$ by a perfect complex $P$ of
$(X, E, -m - 1 + a)$
(possible by Theorem \ref{theorem-approximation}).
Then the induced map
$$
\Ext^i_{\mathcal{O}_X}(E,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
\longrightarrow
\Ext^i_{\mathcal{O}_X}(P,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
$$
is an isomorphism for $i \leq m$. Namely, the kernel, resp.\ cokernel of this
map is a quotient, resp.\ submodule of
$$
\Ext^i_{\mathcal{O}_X}(C,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
\quad\text{resp.}\quad
\Ext^{i + 1}_{\mathcal{O}_X}(C,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
$$
where $C$ is the cone of $P \to E$. Since $C$ has vanishing cohomology
sheaves in degrees $\geq -m - 1 + a$ these $\Ext$-groups are zero
for $i \leq m + 1$ by
Derived Categories, Lemma \ref{derived-lemma-negative-exts}.
This reduces us to the case that
$E$ is a perfect complex which is Lemma \ref{lemma-compute-ext-perfect}.
The statement on boundaries is explained in the proof of
Lemma \ref{lemma-compute-ext-perfect}.

\medskip\noindent
Proof of (B). As in the proof of (A) we may assume $X$ is Noetherian.
Observe that $E$ is pseudo-coherent by
Lemma \ref{lemma-identify-pseudo-coherent-noetherian}.
By Lemma \ref{lemma-pseudo-coherent-hocolim} we can write
$E = \text{hocolim} E_n$ with $E_n$ perfect and $E_n \to E$ inducing
an isomorphism on truncations $\tau_{\geq -n}$. Let $E_n^\vee$
be the dual perfect complex
(Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}).
We obtain an inverse system $\ldots \to E_3^\vee \to E_2^\vee \to E_1^\vee$
of perfect objects. This in turn gives rise to an inverse system
$$
\ldots \to K_3 \to K_2 \to K_1\quad\text{with}\quad
K_n = Rf_*(E_n^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{G}^\bullet)
$$
perfect on $Y$, see Lemma \ref{lemma-tensor-perfect}.
By Lemma \ref{lemma-compute-ext-perfect} and its proof and
by the arguments in the previous paragraph (with $P = E_n$)
for any quasi-coherent $\mathcal{F}$ on $Y$ we have
functorial canonical maps
$$
\xymatrix{
& \Ext^i_{\mathcal{O}_X}(E,
\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})
\ar[ld] \ar[rd] \\
H^i(Y, K_{n + 1} \otimes_{\mathcal{O}_Y}^\mathbf{L} \mathcal{F})
\ar[rr] & &
H^i(Y, K_n \otimes_{\mathcal{O}_Y}^\mathbf{L} \mathcal{F})
}
$$
which are isomorphisms for $i \leq n + a$.
Let $L_n = K_n^\vee$ be the dual perfect complex.
Then we see that $L_1 \to L_2 \to L_3 \to \ldots$
is a system of perfect objects in $D(\mathcal{O}_Y)$
such that for any quasi-coherent $\mathcal{F}$ on $Y$
the maps
$$
\Ext^i_{\mathcal{O}_Y}(L_{n + 1}, \mathcal{F})
\longrightarrow
\Ext^i_{\mathcal{O}_Y}(L_n, \mathcal{F})
$$
are isomorphisms for $i \leq n + a - 1$. This implies that
$L_n \to L_{n + 1}$ induces an isomorphism on truncations
$\tau_{\geq -n - a + 2}$ (hint: take cone of $L_n \to L_{n + 1}$
and look at its last nonvanishing cohomology sheaf).
Thus $L = \text{hocolim} L_n$ is pseudo-coherent, see
Lemma \ref{lemma-pseudo-coherent-hocolim}. The mapping property
of homotopy colimits gives that
$\Ext^i_{\mathcal{O}_Y}(L, \mathcal{F}) =
\Ext^i_{\mathcal{O}_Y}(L_n, \mathcal{F})$
for $i \leq n + a - 3$ which finishes the proof.
\end{proof}

\begin{remark}
\label{remark-base-change-of-L}
The pseudo-coherent complex $L$ of part (B) of Lemma \ref{lemma-compute-ext}
is canonically associated to the situation. For example,
formation of $L$ as in (B) is compatible with base change.
In other words, given a cartesian diagram
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} &
X \ar[d]^f \\
Y' \ar[r]^g &
Y
}
$$
of schemes we have canonical functorial isomorphisms
$$
\Ext^i_{\mathcal{O}_{Y'}}(Lg^*L, \mathcal{F}') \longrightarrow
\Ext^i_{\mathcal{O}_X}(L(g')^*E,
(g')^*\mathcal{G}^\bullet \otimes_{\mathcal{O}_{X'}} (f')^*\mathcal{F}')
$$
for $\mathcal{F}'$ quasi-coherent on $Y'$. Obsere that we do {\bf not} use
derived pullback on $\mathcal{G}^\bullet$ on the right hand side.
If we ever need this, we will
formulate a precise result here and give a detailed proof.
\end{remark}








\section{Limits and derived categories}
\label{section-limits}

\noindent
In this section we collect some results about the derived category
of an algebraic space which is the limit of an inverse system of
algebraic spaces. More precisely, we will work in the following setting.

\begin{situation}
\label{situation-descent}
Let $S$ be a scheme. Let $X = \lim_{i \in I} X_i$ be a limit of a directed
system of algebraic spaces over $S$ with affine transition morphisms
$f_{i'i} : X_{i'} \to X_i$. We denote $f_i : X \to X_i$ the projection.
We assume that $X_i$ is quasi-compact and quasi-separated for all $i \in I$.
We also choose an element $0 \in I$.
\end{situation}

\begin{lemma}
\label{lemma-descend-homomorphisms}
In Situation \ref{situation-descent}. Let $E_0$ and $K_0$ be objects of
$D(\mathcal{O}_{X_0})$. Set $E_i = Lf_{i0}^*E_0$ and $K_i = Lf_{i0}^*K_0$
for $i \geq 0$ and set $E = Lf_0^*E_0$ and $K = Lf_0^*K_0$. Then the map
$$
\colim_{i \geq 0} \Hom_{D(\mathcal{O}_{X_i})}(E_i, K_i)
\longrightarrow
\Hom_{D(\mathcal{O}_X)}(E, K)
$$
is an isomorphism if either
\begin{enumerate}
\item $E_0$ is perfect and $K_0 \in D_\QCoh(\mathcal{O}_{X_0})$, or
\item $E_0$ is pseudo-coherent and
$K_0 \in D_\QCoh(\mathcal{O}_{X_0})$ has finite tor dimension.
\end{enumerate}
\end{lemma}

\begin{proof}
For every quasi-compact and quasi-separated object $U_0$ of
$(X_0)_{spaces, \etale}$ consider the condition $P$ that the canonical
map
$$
\colim_{i \geq 0} \Hom_{D(\mathcal{O}_{U_i})}(E_i|_{U_i}, K_i|_{U_i})
\longrightarrow
\Hom_{D(\mathcal{O}_U)}(E|_U, K|_U)
$$
is an isomorphism, where $U = X \times_{X_0} U_0$ and
$U_i = X_i \times_{X_0} U_0$. We will prove $P$ holds for each $U_0$
by the induction principle of Lemma \ref{lemma-induction-principle}.
Condition (2) of this lemma follows immediately from Mayer-Vietoris
for hom in the derived category, see Lemma \ref{lemma-mayer-vietoris-hom}.
Thus it suffices to prove the lemma when $X_0$ is affine.

\medskip\noindent
If $X_0$ is affine, then the result follows from the case of schemes, see
Derived Categories of Schemes, Lemma \ref{perfect-lemma-descend-homomorphisms}.
To see this use the equivalence of
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}
and use the translation of properties explained in
Lemmas \ref{lemma-descend-pseudo-coherent},
\ref{lemma-descend-tor-amplitude}, and
\ref{lemma-descend-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-perfect-on-limit}
In Situation \ref{situation-descent} the category of perfect
objects of $D(\mathcal{O}_X)$ is the colimit of the categories
of perfect objects of $D(\mathcal{O}_{X_i})$.
\end{lemma}

\begin{proof}
For every quasi-compact and quasi-separated object $U_0$ of
$(X_0)_{spaces, \etale}$ consider the condition $P$ that
the functor
$$
\colim_{i \geq 0} D_{perf}(\mathcal{O}_{U_i})
\longrightarrow
D_{perf}(\mathcal{O}_U)
$$
is an equivalence where ${}_{perf}$ indicates the full subcategory of
perfect objects and where $U = X \times_{X_0} U_0$ and
$U_i = X_i \times_{X_0} U_0$. We will prove $P$ holds for every $U_0$
by the induction principle of Lemma \ref{lemma-induction-principle}.
First, we observe that we already know the functor is fully faithful
by Lemma \ref{lemma-descend-homomorphisms}. Thus it suffices to prove
essential surjectivity.

\medskip\noindent
We first check condition (2) of the induction principle. Thus suppose
that we have an elementary distinguished square
$(U_0 \subset X_0, V_0 \to X_0)$ and that $P$ holds for
$U_0$, $V_0$, and $U_0 \times_{X_0} V_0$. Let $E$ be a perfect object
of $D(\mathcal{O}_X)$. We can find $i \geq 0$ and $E_{U, i}$ perfect on $U_i$
and $E_{V, i}$ perfect on $V_i$ whose pullback to $U$ and $V$ are isomorphic
to $E|_U$ and $E|_V$. Denote
$$
a : E_{U, i} \to (R(X \to X_i)_*E)|_{U_i}
\quad\text{and}\quad
b : E_{V, i} \to (R(X \to X_i)_*E)|_{V_i}
$$
the maps adjoint to the isomorphisms $L(U \to U_i)^*E_{U, i} \to E|_U$
and $L(V \to V_i)^*E_{V, i} \to E|_V$. By fully faithfulness, after
increasing $i$, we can find an isomorphism
$c : E_{U, i}|_{U_i \times_{X_i} V_i} \to E_{V, i}|_{U_i \times_{X_i} V_i}$
which pulls back to the identifications 
$$
L(U \to U_i)^*E_{U, i}|_{U \times_X V} \to E|_{U \times_X V} \to
L(V \to V_i)^*E_{V, i}|_{U \times_X V}.
$$
Apply Lemma \ref{lemma-glue}
to get an object $E_i$ on $X_i$ and a map $d : E_i \to R(X \to X_i)_*E$
which restricts to the maps $a$ and $b$ over $U_i$ and $V_i$.
Then it is clear that $E_i$ is perfect and that
$d$ is adjoint to an isomorphism $L(X \to X_i)^*E_i \to E$.

\medskip\noindent
Finally, we check condition (1) of the induction principle, in other
words, we check the lemma holds when $X_0$ is affine.
This follows from the case of schemes, see
Derived Categories of Schemes, Lemma \ref{perfect-lemma-descend-perfect}.
To see this use the equivalence of
Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}
and use the translation of Lemma \ref{lemma-descend-perfect}.
\end{proof}






\section{Cohomology and base change, VI}
\label{section-cohomology-and-base-change-final}

\noindent
A final section on cohomology and base change continuing
the discussion of Sections
\ref{section-cohomology-and-base-change-perfect},
\ref{section-cohomology-base-change}, and
\ref{section-producing-perfect}.
An easy to grok special case is given in
Remark \ref{remark-explain-perfect-direct-image}.

\begin{lemma}
\label{lemma-base-change-tensor-perfect}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of finite presentation
between algebraic spaces over $S$. Let $E \in D(\mathcal{O}_X)$ be a perfect
object. Let $\mathcal{G}^\bullet$ be a bounded complex of finitely presented
$\mathcal{O}_X$-modules, flat over $Y$, with support proper over $Y$. Then
$$
K = Rf_*(E \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{G}^\bullet)
$$
is a perfect object of $D(\mathcal{O}_Y)$ and its formation
commutes with arbitrary base change.
\end{lemma}

\begin{proof}
The statement on base change is Lemma \ref{lemma-base-change-tensor}.
Thus it suffices to show that $K$ is a perfect object. If $Y$ is
Noetherian, then this follows from
Lemma \ref{lemma-tensor-perfect}.
We will reduce to this case by Noetherian approximation.
We encourage the reader to skip the rest of this proof.

\medskip\noindent
The question is local on $Y$, hence we may assume $Y$ is affine.
Say $Y = \Spec(R)$. We write $R = \colim R_i$ as a filtered colimit
of Noetherian rings $R_i$. By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-finite-presentation}
there exists an $i$ and an algebraic space $X_i$ of finite presentation
over $R_i$ whose base change to $R$ is $X$. By
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-modules-finite-presentation}
we may assume after increasing $i$, that there exists a
bounded complex of finitely
presented $\mathcal{O}_{X_i}$-modules $\mathcal{G}_i^\bullet$ whose
pullback to $X$ is $\mathcal{G}^\bullet$. After increasing $i$
we may assume $\mathcal{G}_i^n$ is flat over $R_i$, see
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-flat}.
After increasing $i$ we may assume the support of $\mathcal{G}_i^n$
is proper over $R_i$, see
Limits of Spaces, Lemma \ref{spaces-limits-lemma-eventually-proper-support}.
Finally, by Lemma \ref{lemma-perfect-on-limit}
we may, after increasing $i$, assume there exists a perfect
object $E_i$ of $D(\mathcal{O}_{X_i})$ whose pullback to
$X$ is $E$. By Lemma \ref{lemma-tensor-perfect} we have that
$K_i =
Rf_{i, *}(E_i \otimes_{\mathcal{O}_{X_i}}^\mathbf{L} \mathcal{G}_i^\bullet)$
is perfect on $\Spec(R_i)$ where $f_i : X_i \to \Spec(R_i)$ is
the structure morphism. By the base change result
(Lemma \ref{lemma-base-change-tensor}) the pullback of $K_i$
to $Y = \Spec(R)$ is $K$ and we conclude.
\end{proof}

\begin{remark}
\label{remark-explain-perfect-direct-image}
Let $R$ be a ring. Let $X$ be an algebraic space of finite presentation over
$R$. Let $\mathcal{G}$ be a finitely presented $\mathcal{O}_X$-module
flat over $R$ with support proper over $R$. By
Lemma \ref{lemma-base-change-tensor-perfect}
there exists a finite complex of finite projective $R$-modules
$M^\bullet$ such that we have
$$
R\Gamma(X_{R'}, \mathcal{G}_{R'}) = M^\bullet \otimes_R R'
$$
functorially in the $R$-algebra $R'$.
\end{remark}

\begin{lemma}
\label{lemma-base-change-tensor-pseudo-coherent}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of finite presentation
between algebraic spaces over $S$.
Let $E \in D(\mathcal{O}_X)$ be a pseudo-coherent object.
Let $\mathcal{G}^\bullet$ be a bounded above complex of
finitely presented $\mathcal{O}_X$-modules,
flat over $Y$, with support proper over $Y$. Then
$$
K = Rf_*(E \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{G}^\bullet)
$$
is a pseudo-coherent object of $D(\mathcal{O}_Y)$ and its formation
commutes with arbitrary base change.
\end{lemma}

\begin{proof}
The statement on base change is Lemma \ref{lemma-base-change-tensor}.
Thus it suffices to show that $K$ is a pseudo-coherent object.
This will follow from Lemma \ref{lemma-base-change-tensor-perfect}
by approximation by perfect complexes. We encourage the reader to
skip the rest of the proof.

\medskip\noindent
The question is \'etale local on $Y$, hence we may assume $Y$ is affine.
Then $X$ is quasi-compact and quasi-separated. Moreover, there
exists an integer $N$ such that total direct image
$Rf_* : D_\QCoh(\mathcal{O}_X) \to D_\QCoh(\mathcal{O}_Y)$
has cohomological dimension $N$ as explained in
Lemma \ref{lemma-quasi-coherence-direct-image}.
Choose an integer $b$ such that $\mathcal{G}^i = 0$ for $i > b$.
It suffices to show that $K$ is $m$-pseudo-coherent for
every $m$. Choose an approximation $P \to E$ by a perfect complex $P$
of $(X, E, m - N - 1 - b)$. This is possible by
Theorem \ref{theorem-approximation}.
Choose a distinguished triangle
$$
P \to E \to C \to P[1]
$$
in $D_\QCoh(\mathcal{O}_X)$. The cohomology sheaves of $C$ are zero
in degrees $\geq m - N - 1 - b$. Hence
the cohomology sheaves of $C \otimes^\mathbf{L} \mathcal{G}^\bullet$
are zero in degrees $\geq m - N - 1$.
Thus the cohomology sheaves of $Rf_*(C \otimes^\mathbf{L} \mathcal{G})$
are zero in degrees $\geq m - 1$. Hence
$$
Rf_*(P \otimes^\mathbf{L} \mathcal{G}) \to
Rf_*(E \otimes^\mathbf{L} \mathcal{G})
$$
is an isomorphism on cohomology sheaves in degrees $\geq m$.
Next, suppose that $H^i(P) = 0$ for $i > a$. Then
$
P \otimes^\mathbf{L} \sigma_{\geq m - N - 1 - a}\mathcal{G}^\bullet
\longrightarrow
P \otimes^\mathbf{L} \mathcal{G}^\bullet
$
is an isomorphism on cohomology sheaves in degrees $\geq m - N - 1$.
Thus again we find that
$$
Rf_*(P \otimes^\mathbf{L} \sigma_{\geq m - N - 1 - a}\mathcal{G}^\bullet) \to
Rf_*(P \otimes^\mathbf{L} \mathcal{G}^\bullet)
$$
is an isomorphism on cohomology sheaves in degrees $\geq m$.
By Lemma \ref{lemma-base-change-tensor-perfect} the source
is a perfect complex.
We conclude that $K$ is $m$-pseudo-coherent as desired.
\end{proof}

\begin{lemma}
\label{lemma-flat-proper-perfect-direct-image-general}
Let $S$ be a scheme. Let $f : X \to Y$ be a proper
morphism of finite presentation of algebraic spaces over $S$.
\begin{enumerate}
\item Let $E \in D(\mathcal{O}_X)$ be perfect and $f$ flat. Then
$Rf_*E$ is a perfect object of $D(\mathcal{O}_Y)$ and its formation
commutes with arbitrary base change.
\item Let $\mathcal{G}$ be an $\mathcal{O}_X$-module of finite presentation,
flat over $S$. Then $Rf_*\mathcal{G}$ is a perfect object of
$D(\mathcal{O}_Y)$ and its formation commutes with arbitrary base change.
\end{enumerate}
\end{lemma}

\begin{proof}
Special cases of
Lemma \ref{lemma-base-change-tensor-perfect} applied with
(1) $\mathcal{G}^\bullet$ equal to $\mathcal{O}_X$ in degree $0$
and (2) $E = \mathcal{O}_X$ and $\mathcal{G}^\bullet$ consisting
of $\mathcal{G}$ sitting in degree $0$.
\end{proof}

\begin{lemma}
\label{lemma-flat-proper-pseudo-coherent-direct-image-general}
Let $S$ be a scheme. Let $f : X \to Y$ be a flat proper
morphism of finite presentation of algebraic spaces over $S$.
Let $E \in D(\mathcal{O}_X)$
be pseudo-coherent. Then $Rf_*E$ is a pseudo-coherent object of
$D(\mathcal{O}_Y)$ and its formation commutes with arbitrary base change.
\end{lemma}

\noindent
More generally, if $f : X \to Y$ is proper and $E$ on $X$ is pseudo-coherent
relative to $Y$ (More on Morphisms of Spaces, Definition
\ref{spaces-more-morphisms-definition-relative-pseudo-coherence}),
then $Rf_*E$ is pseudo-coherent
(but formation does not commute with base change in this generality).
The case of this for schemes is proved in \cite{Kiehl}.

\begin{proof}
Special case of
Lemma \ref{lemma-base-change-tensor-pseudo-coherent} applied with
$\mathcal{G} = \mathcal{O}_X$.
\end{proof}

\begin{lemma}
\label{lemma-pullback-and-limits}
Let $R$ be a ring. Let $X$ be an algebraic space and let
$f : X \to \Spec(R)$ be proper, flat, and
of finite presentation. Let $(M_n)$ be an inverse
system of $R$-modules with surjective transition maps.
Then the canonical map
$$
\mathcal{O}_X \otimes_R (\lim M_n)
\longrightarrow
\lim \mathcal{O}_X \otimes_R M_n
$$
induces an isomorphism from the source to $DQ_X$ applied to the target.
\end{lemma}

\begin{proof}
The statement means that for any object $E$ of
$D_\QCoh(\mathcal{O}_X)$ the induced map
$$
\Hom(E, \mathcal{O}_X \otimes_R (\lim M_n))
\longrightarrow
\Hom(E, \lim \mathcal{O}_X \otimes_R M_n)
$$
is an isomorphism. Since $D_\QCoh(\mathcal{O}_X)$ has
a perfect generator (Theorem \ref{theorem-bondal-van-den-Bergh})
it suffices to check this for perfect $E$.
By Lemma \ref{lemma-Rlim-quasi-coherent} we have
$\lim \mathcal{O}_X \otimes_R M_n = R\lim \mathcal{O}_X \otimes_R M_n$.
The exact functor
$R\Hom_X(E, -) : D_\QCoh(\mathcal{O}_X) \to D(R)$
of Cohomology on Sites, Section \ref{sites-cohomology-section-global-RHom}
commutes with products and hence with derived limits, whence
$$
R\Hom_X(E, \lim \mathcal{O}_X \otimes_R M_n) =
R\lim R\Hom_X(E, \mathcal{O}_X \otimes_R M_n)
$$
Let $E^\vee$ be the dual perfect complex, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}.
We have
$$
R\Hom_X(E, \mathcal{O}_X \otimes_R M_n) =
R\Gamma(X, E^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*M_n) =
R\Gamma(X, E^\vee) \otimes_R^\mathbf{L} M_n
$$
by Lemma \ref{lemma-cohomology-base-change}.
From Lemma \ref{lemma-flat-proper-perfect-direct-image-general}
we see $R\Gamma(X, E^\vee)$ is a perfect complex of $R$-modules.
In particular it is a pseudo-coherent complex and by
More on Algebra, Lemma \ref{more-algebra-lemma-pseudo-coherent-tensor-limit}
we obtain
$$
R\lim R\Gamma(X, E^\vee) \otimes_R^\mathbf{L} M_n =
R\Gamma(X, E^\vee) \otimes_R^\mathbf{L} \lim M_n
$$
as desired.
\end{proof}

\begin{lemma}
\label{lemma-perfect-enough}
Let $A$ be a ring. Let $X$ be an algebraic space over $A$ which is
quasi-compact and quasi-separated. Let $K \in D^-_\QCoh(\mathcal{O}_X)$.
If $R\Gamma(X, E \otimes^\mathbf{L} K)$ is pseudo-coherent
in $D(A)$ for every perfect $E$ in $D(\mathcal{O}_X)$,
then $R\Gamma(X, E \otimes^\mathbf{L} K)$ is pseudo-coherent
in $D(A)$ for every pseudo-coherent $E$ in $D(\mathcal{O}_X)$.
\end{lemma}

\begin{proof}
There exists an integer $N$ such that
$R\Gamma(X, -) : D_\QCoh(\mathcal{O}_X) \to D(A)$
has cohomological dimension $N$ as explained in
Lemma \ref{lemma-quasi-coherence-direct-image}.
Let $b \in \mathbf{Z}$ be such that $H^i(K) = 0$ for $i > b$.
Let $E$ be pseudo-coherent on $X$.
It suffices to show that $R\Gamma(X, E \otimes^\mathbf{L} K)$
is $m$-pseudo-coherent for every $m$.
Choose an approximation $P \to E$ by a perfect complex $P$
of $(X, E, m - N - 1 - b)$. This is possible by
Theorem \ref{theorem-approximation}.
Choose a distinguished triangle
$$
P \to E \to C \to P[1]
$$
in $D_\QCoh(\mathcal{O}_X)$. The cohomology sheaves of $C$ are zero
in degrees $\geq m - N - 1 - b$. Hence the cohomology
sheaves of $C \otimes^\mathbf{L} K$ are zero in degrees $\geq m - N - 1$.
Thus the cohomology of $R\Gamma(X, C \otimes^\mathbf{L} K)$
are zero in degrees $\geq m - 1$. Hence
$$
R\Gamma(X, P \otimes^\mathbf{L} K) \to R\Gamma(X, E \otimes^\mathbf{L} K)
$$
is an isomorphism on cohomology in degrees $\geq m$.
By assumption the source is pseudo-coherent.
We conclude that $R\Gamma(X, E \otimes^\mathbf{L} K)$
is $m$-pseudo-coherent as desired.
\end{proof}

\begin{lemma}
\label{lemma-base-change-RHom-perfect}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of finite presentation
between algebraic spaces over $S$.
Let $E \in D(\mathcal{O}_X)$ be a perfect object. Let $\mathcal{G}^\bullet$
be a bounded complex of finitely presented $\mathcal{O}_X$-modules,
flat over $Y$, with support proper over $Y$. Then
$$
K = Rf_*R\SheafHom(E, \mathcal{G}^\bullet)
$$
is a perfect object of $D(\mathcal{O}_Y)$ and its formation
commutes with arbitrary base change.
\end{lemma}

\begin{proof}
The statement on base change is Lemma \ref{lemma-base-change-RHom}.
Thus it suffices to show that $K$ is a perfect object. If $Y$ is
Noetherian, then this follows from Lemma \ref{lemma-ext-perfect}.
We will reduce to this case by Noetherian approximation.
We encourage the reader to skip the rest of this proof.

\medskip\noindent
The question is local on $Y$, hence we may assume $Y$ is affine.
Say $Y = \Spec(R)$. We write $R = \colim R_i$ as a filtered colimit
of Noetherian rings $R_i$. By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-finite-presentation}
there exists an $i$ and an algebraic space $X_i$ of finite presentation
over $R_i$ whose base change to $R$ is $X$. By
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-modules-finite-presentation}
we may assume after increasing $i$, that there exists a bounded
complex of finitely
presented $\mathcal{O}_{X_i}$-module $\mathcal{G}_i^\bullet$ whose
pullback to $X$ is $\mathcal{G}$. After increasing $i$
we may assume $\mathcal{G}_i^n$ is flat over $R_i$, see
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-flat}.
After increasing $i$ we may assume the support of $\mathcal{G}_i^n$
is proper over $R_i$, see
Limits of Spaces, Lemma \ref{spaces-limits-lemma-eventually-proper-support}.
Finally, by Lemma \ref{lemma-descend-perfect}
we may, after increasing $i$, assume there exists a perfect
object $E_i$ of $D(\mathcal{O}_{X_i})$ whose pullback to
$X$ is $E$. Applying Lemma \ref{lemma-compute-ext-perfect}
to $X_i \to \Spec(R_i)$, $E_i$, $\mathcal{G}_i^\bullet$ and using the
base change property already shown we obtain the result.
\end{proof}









\section{Perfect complexes}
\label{section-perfect-complexes}

\noindent
We first talk about jumping loci for betti numbers of perfect complexes.
First we have to define betti numbers.

\medskip\noindent
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $E$ be an object of $D(\mathcal{O}_X)$.
Let $x \in |X|$. We want to define
$\beta_i(x) \in \{0, 1, 2, \ldots \} \cup \{\infty\}$.
To do this, choose a morphism $f : \Spec(k) \to X$ in the equivalence
class of $x$. Then $Lf^*E$ is an object of $D(\Spec(k)_\etale, \mathcal{O})$.
By \'Etale Cohomology, Lemma
\ref{etale-cohomology-lemma-all-modules-quasi-coherent} and
Theorem \ref{etale-cohomology-theorem-quasi-coherent}
we find that $D(\Spec(k)_\etale, \mathcal{O}) = D(k)$ is the
derived category of $k$-vector spaces.
Hence $Lf^*E$ is a complex of $k$-vector spaces and we can
take $\beta_i(x) = \dim_k H^i(Lf^*E)$. It is easy to see that
this does not depend on the choice of the representative in $x$.
Moreover, if $X$ is a scheme, this is the same as the notion
used in Derived Categories of Schemes, Section
\ref{perfect-section-perfect-complexes}.

\begin{lemma}
\label{lemma-jump-loci}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $E \in D(\mathcal{O}_X)$ be pseudo-coherent (for example perfect).
For any $i \in \mathbf{Z}$ consider the function
$$
\beta_i : |X| \longrightarrow \{0, 1, 2, \ldots\}
$$
defined above. Then we have
\begin{enumerate}
\item formation of $\beta_i$ commutes with arbitrary base change,
\item the functions $\beta_i$ are upper semi-continuous, and
\item the level sets of $\beta_i$ are \'etale locally constructible.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a scheme $U$ and a surjective \'etale morphism $\varphi : U \to X$.
Then $L\varphi^*E$ is a pseudo-coherent complex on the scheme $U$ (use
Lemma \ref{lemma-descend-pseudo-coherent}) and we can apply the result
for schemes, see
Derived Categories of Schemes, Lemma \ref{perfect-lemma-jump-loci}.
The meaning of part (3) is that the inverse image of the level sets
to $U$ are locally constructible, see
Properties of Spaces, Definition
\ref{spaces-properties-definition-locally-constructible}.
\end{proof}

\begin{lemma}
\label{lemma-jump-loci-geometric}
Let $Y$ be a scheme and let $X$ be an algebraic space over $Y$
such that the structure morphism $f : X \to Y$
is flat, proper, and of finite presentation.
Let $\mathcal{F}$ be an $\mathcal{O}_X$-module of finite presentation,
flat over $Y$. For fixed $i \in \mathbf{Z}$ consider the function
$$
\beta_i : |Y| \to \{0, 1, 2, \ldots\},\quad
y \longmapsto \dim_{\kappa(y)} H^i(X_y, \mathcal{F}_y)
$$
Then we have
\begin{enumerate}
\item formation of $\beta_i$ commutes with arbitrary base change,
\item the functions $\beta_i$ are upper semi-continuous, and
\item the level sets of $\beta_i$ are locally constructible in $Y$.
\end{enumerate}
\end{lemma}

\begin{proof}
By cohomology and base change (more precisely by
Lemma \ref{lemma-flat-proper-perfect-direct-image-general})
the object $K = Rf_*\mathcal{F}$ is a perfect object of the derived
category of $Y$ whose formation commutes with arbitrary base change.
In particular we have
$$
H^i(X_y, \mathcal{F}_y) = H^i(K \otimes_{\mathcal{O}_Y}^\mathbf{L} \kappa(y))
$$
Thus the lemma follows from Lemma \ref{lemma-jump-loci}.
\end{proof}

\begin{lemma}
\label{lemma-chi-locally-constant}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $E \in D(\mathcal{O}_X)$ be perfect. The function
$$
\chi_E : |X| \longrightarrow \mathbf{Z},\quad
x \longmapsto \sum (-1)^i \beta_i(x)
$$
is locally constant on $X$.
\end{lemma}

\begin{proof}
Omitted. Hints:
Follows from the case of schemes by \'etale localization. See
Derived Categories of Schemes, Lemma \ref{perfect-lemma-chi-locally-constant}.
\end{proof}

\begin{lemma}
\label{lemma-open-where-cohomology-in-degree-i-rank-r}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $E \in D(\mathcal{O}_X)$ be perfect.
Given $i, r \in \mathbf{Z}$, there exists an
open subspace $U \subset X$ characterized by the following
\begin{enumerate}
\item $E|_U \cong H^i(E|_U)[-i]$ and $H^i(E|_U)$ is a locally free
$\mathcal{O}_U$-module of rank $r$,
\item a morphism $f : Y \to X$ factors through $U$ if and only if
$Lf^*E$ is isomorphic to a locally free module of rank $r$
placed in degree $i$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hints:
Follows from the case of schemes by \'etale localization. See
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-open-where-cohomology-in-degree-i-rank-r}.
\end{proof}

\begin{lemma}
\label{lemma-open-where-cohomology-in-degree-i-rank-r-geometric}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is proper, flat, and of finite presentation.
Let $\mathcal{F}$ be an $\mathcal{O}_X$-module of finite presentation,
flat over $Y$. Fix $i, r \in \mathbf{Z}$.
Then there exists an open subspace
$V \subset Y$ with the following property:
A morphism $T \to Y$ factors through $V$ if and only if
$Rf_{T, *}\mathcal{F}_T$ is isomorphic to a
finite locally free module of rank $r$ placed in degree $i$.
\end{lemma}

\begin{proof}
By cohomology and base change (
Lemma \ref{lemma-flat-proper-perfect-direct-image-general})
the object $K = Rf_*\mathcal{F}$ is a perfect object of the derived
category of $Y$ whose formation commutes with arbitrary base change.
Thus this lemma follows immediately from
Lemma \ref{lemma-open-where-cohomology-in-degree-i-rank-r}.
\end{proof}

\begin{lemma}
\label{lemma-locally-closed-where-H0-locally-free}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $E \in D(\mathcal{O}_X)$ be perfect
of tor-amplitude in $[a, b]$ for some $a, b \in \mathbf{Z}$.
Let $r \geq 0$.
Then there exists a locally closed subspace $j : Z \to X$
characterized by the following
\begin{enumerate}
\item $H^a(Lj^*E)$ is a locally free $\mathcal{O}_Z$-module of rank $r$, and
\item a morphism $f : Y \to X$ factors through $Z$ if and only if
for all morphisms $g : Y' \to Y$ the $\mathcal{O}_{Y'}$-module
$H^a(L(f \circ g)^*E)$ is locally free of rank $r$.
\end{enumerate}
Moreover, $j : Z \to X$ is of finite presentation and we have
\begin{enumerate}
\item[(3)] if $f : Y \to X$ factors as $Y \xrightarrow{g} Z \to X$, then
$H^a(Lf^*E) = g^*H^a(Lj^*E)$,
\item[(4)] if $\beta_a(x) \leq r$ for all $x \in |X|$, then $j$ is
a closed immersion and given $f : Y \to X$ the following are equivalent
\begin{enumerate}
\item $f : Y \to X$ factors through $Z$,
\item $H^0(Lf^*E)$ is a locally free $\mathcal{O}_Y$-module of rank $r$,
\end{enumerate}
and if $r = 1$ these are also equivalent to
\begin{enumerate}
\item[(c)] $\mathcal{O}_Y \to \SheafHom_{\mathcal{O}_Y}(H^0(Lf^*E), H^0(Lf^*E))$
is injective.
\end{enumerate}
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hints:
Follows from the case of schemes by \'etale localization. See
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-locally-closed-where-H0-locally-free}.
\end{proof}

\begin{lemma}
\label{lemma-proper-flat-h0}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$. Assume
\begin{enumerate}
\item $f$ is proper, flat, and of finite presentation, and
\item for a morphism $\Spec(k) \to Y$ where $k$ is a field, we have
$k = H^0(X_k, \mathcal{O}_{X_k})$.
\end{enumerate}
Then we have
\begin{enumerate}
\item[(a)] $f_*\mathcal{O}_X = \mathcal{O}_Y$ and
this holds after any base change,
\item[(b)] \'etale locally on $Y$ we have
$$
Rf_*\mathcal{O}_X = \mathcal{O}_Y \oplus P
$$
in $D(\mathcal{O}_Y)$
where $P$ is perfect of tor amplitude in $[1, \infty)$.
\end{enumerate}
\end{lemma}

\begin{proof}
It suffices to prove (a) and (b) \'etale locally on $Y$, thus we may and do
assume $Y$ is an affine scheme.
By cohomology and base change
(Lemma \ref{lemma-flat-proper-perfect-direct-image-general})
the complex $E = Rf_*\mathcal{O}_X$
is perfect and its formation commutes with arbitrary base change.
In particular, for $y \in Y$ we see that
$H^0(E \otimes^\mathbf{L} \kappa(y)) =
H^0(X_y, \mathcal{O}_{X_y}) = \kappa(y)$.
Thus $\beta_0(y) \leq 1$ for all $y \in Y$ with notation as in
Lemma \ref{lemma-jump-loci}. Apply
Lemma \ref{lemma-locally-closed-where-H0-locally-free}
with $a = 0$ and $r = 1$. We obtain a universal closed subscheme
$j : Z \to Y$ with $H^0(Lj^*E)$ invertible characterized
by the equivalence of (4)(a), (b), and (c) of the lemma.
Since formation of $E$ commutes with base change, we have
$$
Lf^*E = R\text{pr}_{1, *}\mathcal{O}_{X \times_Y X}
$$
The morphism $\text{pr}_1 : X \times_Y X$ has a section
namely the diagonal morphism $\Delta$ for $X$ over $Y$.
We obtain maps
$$
\mathcal{O}_X \longrightarrow R\text{pr}_{1, *}\mathcal{O}_{X \times_Y X}
\longrightarrow \mathcal{O}_X
$$
in $D(\mathcal{O}_X)$ whose composition is the identity. Thus
$R\text{pr}_{1, *}\mathcal{O}_{X \times_Y X} = \mathcal{O}_X \oplus E'$
in $D(\mathcal{O}_X)$. Thus $\mathcal{O}_X$ is a direct summand of
$H^0(Lf^*E)$ and we conclude that $X \to Y$ factors through $Z$
by the equivalence of (4)(c) and (4)(a) of the lemma cited above.
Since $\{X \to Y\}$ is an fppf covering, we have $Z = Y$.
Thus $f_*\mathcal{O}_X$ is an invertible $\mathcal{O}_Y$-module.
We conclude $\mathcal{O}_Y \to f_*\mathcal{O}_X$ is an isomorphism
because a ring map $A \to B$ such that $B$ is invertible as an $A$-module
is an isomorphism. Since the assumptions are preserved under base
change, we see that (a) is true.

\medskip\noindent
Proof of (b). Above we have seen that for every $y \in Y$ the map
$\mathcal{O}_Y \to H^0(E \otimes^\mathbf{L} \kappa(y))$ is surjective.
Thus we may apply
More on Algebra, Lemma \ref{more-algebra-lemma-better-cut-complex-in-two}
to see that in an open neighbourhood of $y$ we have
a decomposition $Rf_*\mathcal{O}_X = \mathcal{O}_Y \oplus P$
\end{proof}

\begin{lemma}
\label{lemma-proper-flat-geom-red-connected}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$. Assume
\begin{enumerate}
\item $f$ is proper, flat, and of finite presentation, and
\item the geometric fibres of $f$ are reduced and connected.
\end{enumerate}
Then $f_*\mathcal{O}_X = \mathcal{O}_Y$ and this holds
after any base change.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-proper-flat-h0}
it suffices to show that $k = H^0(X_k, \mathcal{O}_{X_k})$
for all morphisms $\Spec(k) \to Y$ where $k$ is a field. This follows from
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-proper-geometrically-reduced-global-sections}
and the fact that $X_k$ is geometrically connected and geometrically reduced.
\end{proof}








\section{Other applications}
\label{section-other-applications}

\noindent
In this section we state and prove some results that can be deduced
from the theory worked out above.

\begin{lemma}
\label{lemma-countable-cohomology}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $K$ be an object of $D_\QCoh(\mathcal{O}_X)$
such that the cohomology sheaves $H^i(K)$ have countable
sets of sections over affine schemes \'etale over $X$.
Then for any quasi-compact and quasi-separated \'etale morphism $U \to X$
and any perfect object $E$ in $D(\mathcal{O}_X)$
the sets
$$
H^i(U, K \otimes^\mathbf{L} E),\quad \Ext^i(E|_U, K|_U)
$$
are countable.
\end{lemma}

\begin{proof}
Using Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-dual-perfect-complex}
we see that it suffices to prove the result
for the groups $H^i(U, K \otimes^\mathbf{L} E)$.
We will use the induction principle to prove the lemma, see
Lemma \ref{lemma-induction-principle}.

\medskip\noindent
When $U = \Spec(A)$ is affine the result follows from
the case of schemes, see Derived Categories of Schemes,
Lemma \ref{perfect-lemma-countable-cohomology}.

\medskip\noindent
To finish the proof it suffices to show: if $(U \subset W, V \to W)$
is an elementary distinguished triangle
and the result holds for $U$, $V$, and $U \times_W V$, then
the result holds for $W$. This is an immediate consquence
of the Mayer-Vietoris sequence, see
Lemma \ref{lemma-unbounded-mayer-vietoris}.
\end{proof}

\begin{lemma}
\label{lemma-countable}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Assume the sets of sections of $\mathcal{O}_X$ over affines \'etale over $X$
are countable. Let $K$ be an object of $D_\QCoh(\mathcal{O}_X)$. The
following are equivalent
\begin{enumerate}
\item $K = \text{hocolim} E_n$ with $E_n$ a perfect object of
$D(\mathcal{O}_X)$, and
\item the cohomology sheaves $H^i(K)$ have countable
sets of sections over affines \'etale over $X$.
\end{enumerate}
\end{lemma}

\begin{proof}
If (1) is true, then (2) is true because homotopy colimits commutes
with taking cohomology sheaves
(by Derived Categories, Lemma \ref{derived-lemma-cohomology-of-hocolim})
and because a perfect complex is
locally isomorphic to a finite complex of finite free $\mathcal{O}_X$-modules
and therefore satisfies (2) by assumption on $X$.

\medskip\noindent
Assume (2).
Choose a K-injective complex $\mathcal{K}^\bullet$ representing $K$.
Choose a perfect generator $E$ of $D_\QCoh(\mathcal{O}_X)$ and
represent it by a K-injective complex $\mathcal{I}^\bullet$.
According to Theorem \ref{theorem-DQCoh-is-Ddga}
and its proof there is an equivalence
of triangulated categories $F : D_\QCoh(\mathcal{O}_X) \to D(A, \text{d})$
where $(A, \text{d})$ is the differential graded algebra
$$
(A, \text{d}) =
\Hom_{\text{Comp}^{dg}(\mathcal{O}_X)}
(\mathcal{I}^\bullet, \mathcal{I}^\bullet)
$$
which maps $K$ to the differential graded module
$$
M = \Hom_{\text{Comp}^{dg}(\mathcal{O}_X)}
(\mathcal{I}^\bullet, \mathcal{K}^\bullet)
$$
Note that $H^i(A) = \Ext^i(E, E)$ and
$H^i(M) = \Ext^i(E, K)$.
Moreover, since $F$ is an equivalence it and its quasi-inverse commute
with homotopy colimits.
Therefore, it suffices to write $M$ as a homotopy colimit
of compact objects of $D(A, \text{d})$.
By Differential Graded Algebra, Lemma \ref{dga-lemma-countable}
it suffices show that $\Ext^i(E, E)$ and
$\Ext^i(E, K)$ are countable for each $i$.
This follows from Lemma \ref{lemma-countable-cohomology}.
\end{proof}

\begin{lemma}
\label{lemma-computing-sections-as-colim}
Let $A$ be a ring. Let $f : U \to X$ be a flat morphism of algebraic spaces
of finite presentation over $A$. Then
\begin{enumerate}
\item there exists an inverse system of perfect objects $L_n$ of
$D(\mathcal{O}_X)$ such that
$$
R\Gamma(U, Lf^*K) = \text{hocolim}\ R\Hom_X(L_n, K)
$$
in $D(A)$ functorially in $K$ in $D_\QCoh(\mathcal{O}_X)$, and
\item there exists a system of perfect objects $E_n$ of
$D(\mathcal{O}_X)$ such that
$$
R\Gamma(U, Lf^*K) = \text{hocolim}\ R\Gamma(X, E_n \otimes^\mathbf{L} K)
$$
in $D(A)$ functorially in $K$ in $D_\QCoh(\mathcal{O}_X)$.
\end{enumerate}
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-cohomology-base-change} we have
$$
R\Gamma(U, Lf^*K) = R\Gamma(X, Rf_*\mathcal{O}_U \otimes^\mathbf{L} K)
$$
functorially in $K$. Observe that $R\Gamma(X, -)$ commutes with
homotopy colimits because it commutes with direct sums by
Lemma \ref{lemma-quasi-coherence-pushforward-direct-sums}.
Similarly, $- \otimes^\mathbf{L} K$ commutes with derived colimits
because $- \otimes^\mathbf{L} K$ commutes with direct sums
(because direct sums in $D(\mathcal{O}_X)$
are given by direct sums of representing complexes).
Hence to prove (2) it suffices to write
$Rf_*\mathcal{O}_U = \text{hocolim} E_n$ for a system of
perfect objects $E_n$ of $D(\mathcal{O}_X)$. Once this is done
we obtain (1) by setting $L_n = E_n^\vee$, see Cohomology on Sites,
Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}.

\medskip\noindent
Write $A = \colim A_i$ with $A_i$ of finite type over $\mathbf{Z}$. By
Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-finite-presentation}
we can find an $i$ and morphisms $U_i \to X_i \to \Spec(A_i)$
of finite presentation whose base change to $\Spec(A)$ recovers
$U \to X \to \Spec(A)$.
After increasing $i$ we may assume that $f_i : U_i \to X_i$ is
flat, see Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-flat}.
By Lemma \ref{lemma-compare-base-change}
the derived pullback of $Rf_{i, *}\mathcal{O}_{U_i}$
by $g : X \to X_i$ is equal to $Rf_*\mathcal{O}_U$.
Since $Lg^*$ commutes with derived colimits, it suffices
to prove what we want for $f_i$. Hence we may assume that
$U$ and $X$ are of finite type over $\mathbf{Z}$.

\medskip\noindent
Assume $f : U \to X$ is a morphism of algebraic spaces
of finite type over $\mathbf{Z}$. To finish the proof
we will show that $Rf_*\mathcal{O}_U$ is a homotopy
colimit of perfect complexes. To see this we apply Lemma \ref{lemma-countable}.
Thus it suffices to show that $R^if_*\mathcal{O}_U$
has countable sets of sections over affines \'etale over $X$.
This follows from Lemma \ref{lemma-countable-cohomology}
applied to the structure sheaf.
\end{proof}









\section{The resolution property}
\label{section-resolution-property}

\noindent
This section is the analogue of Derived Categories of Schemes, Section
\ref{perfect-section-resolution-property} for algebraic spaces; please
read that section first. It is currently not known if a smooth
proper algebraic space over a field always has the resolution property
or if this is false. If you know the answer to this question, please email
\href{mailto:stacks.project@gmail.com}{stacks.project@gmail.com}.

\medskip\noindent
We can make the following definition although it scarcely makes
sense to consider it for general algebraic spaces.

\begin{definition}
\label{definition-resolution-property}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
We say $X$ has the {\it resolution property} if every quasi-coherent
$\mathcal{O}_X$-module of finite type is the quotient of a
finite locally free $\mathcal{O}_X$-module.
\end{definition}

\noindent
If $X$ is a quasi-compact and quasi-separated algebraic space, then
it suffices to check every $\mathcal{O}_X$-module module of
finite presentation (automatically quasi-coherent) is the quotient
of a finite locally free $\mathcal{O}_X$-module, see
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-finite-directed-colimit-surjective-maps}.
If $X$ is a Noetherian algebraic space, then finite type quasi-coherent modules
are exactly the coherent $\mathcal{O}_X$-modules, see
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-coherent-Noetherian}.

\begin{lemma}
\label{lemma-resolution-property-ample-relative}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$. Assume
\begin{enumerate}
\item $Y$ is quasi-compact and quasi-separated and has the resolution property,
\item there exists an $f$-ample invertible module on $X$
(Divisors on Spaces, Definition
\ref{spaces-divisors-definition-relatively-ample}).
\end{enumerate}
Then $X$ has the resolution property.
\end{lemma}

\begin{proof}
Let $\mathcal{F}$ be a finite type quasi-coherent $\mathcal{O}_X$-module.
Let $\mathcal{L}$ be an $f$-ample invertible module.
Choose an affine scheme $V$ and a surjective \'etale morphism $V \to Y$.
Set $U = V \times_Y X$. Then $\mathcal{L}|_U$ is ample on $U$.
By Properties, Proposition
\ref{properties-proposition-characterize-ample}
we know there exists finitely many maps
$s_i : \mathcal{L}^{\otimes n_i}|_U \to \mathcal{F}|_U$
which are jointly surjective. Consider the quasi-coherent
$\mathcal{O}_Y$-modules
$$
\mathcal{H}_n =
f_*(\mathcal{F} \otimes_{\mathcal{O}_X} \mathcal{L}^{\otimes n})
$$
We may think of $s_i$ as a section over $V$ of the sheaf
$\mathcal{H}_{-n_i}$. Suppose we can find finite locally
free $\mathcal{O}_Y$-modules $\mathcal{E}_i$ and maps
$\mathcal{E}_i \to \mathcal{H}_{-n_i}$ such that
$s_i$ is in the image. Then the corresponding maps
$$
f^*\mathcal{E}_i
\otimes_{\mathcal{O}_X}
\mathcal{L}^{\otimes n_i} \longrightarrow \mathcal{F}
$$
are going to be jointly surjective and the lemma is proved. By
Limits of Spaces, Lemma \ref{spaces-limits-lemma-directed-colimit-finite-type}
for each $i$ we can find a finite type quasi-coherent submodule
$\mathcal{H}'_i \subset  \mathcal{H}_{-n_i}$
which contains the section $s_i$ over $V$.
Thus the resolution property of $Y$ produces surjections
$\mathcal{E}_i \to \mathcal{H}'_i$ and we conclude.
\end{proof}

\begin{lemma}
\label{lemma-resolution-property-goes-up-affine}
Let $S$ be a scheme.
Let $f : X \to Y$ be an affine or quasi-affine morphism of
algebraic spaces over $S$ with
$Y$ quasi-compact and quasi-separated.
If $Y$ has the resolution property, so does $X$.
\end{lemma}

\begin{proof}
By Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-quasi-affine-O-ample}
this is a special case of
Lemma \ref{lemma-resolution-property-ample-relative}.
\end{proof}

\noindent
Here is a case where one can prove the resolution property goes down.

\begin{lemma}
\label{lemma-resolution-property-goes-down-finite-flat}
Let $S$ be a scheme.
Let $f : X \to Y$ be a surjective finite locally free morphism of
algebraic spaces over $S$.
If $X$ has the resolution property, so does $Y$.
\end{lemma}

\begin{proof}
The condition means that $f$ is affine and that $f_*\mathcal{O}_X$
is a finite locally free $\mathcal{O}_Y$-module of positive rank.
Let $\mathcal{G}$ be a quasi-coherent $\mathcal{O}_Y$-module
of finite type. By assumption there exists a surjection
$\mathcal{E} \to f^*\mathcal{G}$ for some finite locally free
$\mathcal{O}_X$-module $\mathcal{E}$. Since $f_*$ is exact
(Cohomology of Spaces, Section \ref{spaces-cohomology-section-finite-morphisms})
we get a surjection
$$
f_*\mathcal{E}
\longrightarrow
f_*f^*\mathcal{G} = \mathcal{G} \otimes_{\mathcal{O}_Y} f_*\mathcal{O}_X
$$
Taking duals we get a surjection
$$
f_*\mathcal{E}
\otimes_{\mathcal{O}_Y}
\SheafHom_{\mathcal{O}_Y}(f_*\mathcal{O}_X, \mathcal{O}_Y)
\longrightarrow
\mathcal{G}
$$
Since $f_*\mathcal{E}$ is finite locally free, we conclude.
\end{proof}

\noindent
For more on the resolution property of algebraic spaces, please see
More on Morphisms of Spaces, Section
\ref{spaces-more-morphisms-section-resolution-property}.












\section{Detecting Boundedness}
\label{section-detecting-boundedness}

\noindent
In this section, we show that compact generators of $D_\QCoh$ of a
quasi-compact, quasi-separated scheme, as constructed in
Section \ref{section-generating}, have a special property.
We recommend reading that section first as it is very similar to this one.

\begin{lemma}
\label{lemma-bounded-truncation}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $P \in D_{perf}(\mathcal{O}_X)$ and $E \in D_{\QCoh}(\mathcal{O}_X)$.
Let $a \in \mathbf{Z}$. The following are equivalent
\begin{enumerate}
\item $\Hom_{D(\mathcal{O}_X)}(P[-i], E) = 0$ for $i \gg 0$, and
\item $\Hom_{D(\mathcal{O}_X)}(P[-i], \tau_{\geq a} E) = 0$ for $i \gg 0$.
\end{enumerate}
\end{lemma}

\begin{proof}
Using the triangle $ \tau_{< a} E \to E \to \tau_{\geq a} E \to$
we see that the equivalence follows if we can show
$$
\Hom_{D(\mathcal{O}_X)}(P[-i], \tau_{< a} E) =
\Hom_{D(\mathcal{O}_X)}(P, (\tau_{< a} E)[i]) = 0
$$
for $i \gg 0$. As $P$ is perfect this is true by
Lemma \ref{lemma-ext-from-perfect-into-bounded-QCoh}.
\end{proof}

\begin{lemma}
\label{lemma-bounded-below-truncation}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$. Let
$P \in D_{perf}(\mathcal{O}_X)$ and $E \in D_{\QCoh}(\mathcal{O}_X)$.
Let $a \in \mathbf{Z}$. The following are equivalent
\begin{enumerate}
\item $\Hom_{D(\mathcal{O}_X)}(P[-i], E) = 0$ for $i \ll 0$, and
\item $\Hom_{D(\mathcal{O}_X)}(P[-i], \tau_{\leq a} E) = 0$ for $i \ll 0$.
\end{enumerate}
\end{lemma}

\begin{proof}
Using the triangle $ \tau_{\leq a} E \to E \to \tau_{> a} E \to$
we see that the equivalence follows if we can show
$$
\Hom_{D(\mathcal{O}_X)}(P[-i], \tau_{> a} E) =
\Hom_{D(\mathcal{O}_X)}(P, (\tau_{> a} E)[i]) = 0
$$
for $i \ll 0$. As $P$ is perfect this is true by
Lemma \ref{lemma-ext-from-perfect-into-bounded-QCoh}.
\end{proof}

\begin{proposition}
\label{proposition-detecting-bounded-above}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $G \in D_{perf}(\mathcal{O}_X)$ be a perfect complex which generates
$D_\QCoh (\mathcal{O}_X)$. Let $E \in D_\QCoh (\mathcal{O}_X)$.
The following are equivalent
\begin{enumerate}
\item $E \in D^-_\QCoh (\mathcal{O}_X)$,
\item $\Hom_{D(\mathcal{O}_X)}(G[-i], E) = 0$ for $i \gg 0$,
\item $\Ext^i_X(G, E) = 0$ for $i \gg 0$,
\item $R\Hom_X(G, E)$ is in $D^-(\mathbf{Z})$,
\item $H^i(X, G^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} E) = 0$
for $i \gg 0$,
\item $R\Gamma(X, G^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} E)$
is in $D^-(\mathbf{Z})$,
\item for every perfect object $P$ of $D(\mathcal{O}_X)$
\begin{enumerate}
\item the assertions (2), (3), (4) hold with $G$ replaced by $P$, and
\item $H^i(X, P \otimes_{\mathcal{O}_X}^\mathbf{L} E) = 0$ for $i \gg 0$,
\item $R\Gamma(X, P \otimes_{\mathcal{O}_X}^\mathbf{L} E)$
is in $D^-(\mathbf{Z})$.
\end{enumerate}
\end{enumerate}
\end{proposition}

\begin{proof}
Assume (1). Since
$\Hom_{D(\mathcal{O}_X)}(G[-i], E) = \Hom_{D(\mathcal{O}_X)}(G, E[i])$
we see that this is zero for $i \gg 0$ by
Lemma \ref{lemma-ext-from-perfect-into-bounded-QCoh}. This proves
that (1) implies (2).

\medskip\noindent
Parts (2), (3), (4) are equivalent by the discussion in
Cohomology on Sites, Section \ref{sites-cohomology-section-global-RHom}.
Part (5) and (6) are equivalent as $H^i(X, -) = H^i(R\Gamma(X, -))$
by definition. The equivalent conditions (2), (3), (4) are
equivalent to the equivalent conditions (5), (6) by
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}
and the fact that $(G[-i])^\vee = G^\vee[i]$.

\medskip\noindent
It is clear that (7) implies (2). Conversely,
let us prove that the equivalent conditions (2) -- (6) imply (7).
Recall that $G$ is a  classical generator for $D_{perf}(\mathcal{O}_X)$ by
Remark \ref{remark-classical-generator}.
For $P \in D_{perf}(\mathcal{O}_X)$ let $T(P)$ be the assertion that
$R\Hom_X(P, E)$ is in $D^-(\mathbf{Z})$.
Clearly, $T$ is inherited by direct sums,
satisfies the 2-out-of-three property for distinguished
triangles, is inherited by direct summands, and is perserved by shifts.
Hence by Derived Categories, Remark \ref{derived-remark-check-on-generator}
we see that (4) implies $T$ holds on all of $D_{perf}(\mathcal{O}_X)$.
The same argument works for all other properties, except that for property
(7)(b) and (7)(c) we also use that $P \mapsto P^\vee$ is a self
equivalence of $D_{perf}(\mathcal{O}_X)$. Small detail omitted.

\medskip\noindent
We will prove the equivalent conditions (2) -- (7) imply (1)
using the induction principle of
Lemma \ref{lemma-induction-principle}.

\medskip\noindent
First, we prove (2) -- (7) $\Rightarrow$ (1) if $X$ is affine.
This follows from the case of schemes, see
Derived Categories of Schemes, Proposition
\ref{perfect-proposition-detecting-bounded-above}.

\medskip\noindent
Now assume $(U \subset X, j : V \to X)$ is an elementary distinguished
square of quasi-compact and quasi-separated algebraic spaces over $S$
and assume the implication (2) -- (7) $\Rightarrow$ (1)
is known for $U$, $V$, and $U \times_X V$. To finish the proof
we have to show the implication (2) -- (7) $\Rightarrow$ (1) for $X$.
Suppose $E \in D_\QCoh(\mathcal{O}_X)$ satisfies (2) -- (7).
By Lemma \ref{lemma-direct-summand-of-a-restriction} and
Theorem \ref{theorem-bondal-van-den-Bergh} there exists a perfect
complex $Q$ on $X$ such that $Q|_U$ generates $D_\QCoh (\mathcal{O}_U)$.

\medskip\noindent
Say $V = \Spec(A)$. Let $Z \subset V$ be the reduced closed subscheme
which is the inverse image of $X \setminus U$ and maps isomorphically to it
(see Definition \ref{definition-elementary-distinguished-square}).
This is a retrocompact closed subset of $V$.
Choose $f_1, \ldots, f_r \in A$ such that
$Z = V(f_1, \ldots, f_r)$. Let $K \in D(\mathcal{O}_V)$ be the perfect
object corresponding to the Koszul complex on $f_1, \ldots, f_r$ over $A$.
Note that since $K$ is supported on $Z$, the pushforward
$K' = Rj_*K$ is a perfect object of $D(\mathcal{O}_X)$ whose
restriction to $V$ is $K$ (see Lemmas \ref{lemma-pushforward-perfect}
and \ref{lemma-pushforward-with-support-in-open}).
By assumption, we know $R\Hom_{\mathcal{O}_X}(Q, E)$ and
$R\Hom_{\mathcal{O}_X}(K', E)$ are bounded above.

\medskip\noindent
By Lemma \ref{lemma-pushforward-with-support-in-open}
we have $K' =  j_!K$ and hence
$$
\Hom_{D(\mathcal{O}_X)}(K'[-i], E) = \Hom_{D(\mathcal{O}_V)}(K[-i], E|_V) = 0
$$
for $i \gg 0$. Therefore, we may apply
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-orthogonal-koszul-first-variant} to $E|_V$ to
obtain an integer $a$ such that
$\tau_{\geq a}(E|_V) =
\tau_{\geq a} R (U \times_X V \to V)_* (E|_{U \times_X V})$.
Then $\tau_{\geq a} E = \tau_{\geq a} R (U \to X)_* (E |_U)$
(check that the canonical map is an isomorphism after restricting to
$U$ and to $V$). Hence using Lemma \ref{lemma-bounded-truncation}
twice we see that
$$
\Hom_{D(\mathcal{O}_U)}(Q|_U [-i], E|_U) =
\Hom_{D(\mathcal{O}_X)}(Q[-i], R (U \to X)_* (E|_U)) = 0
$$
for $i \gg 0$. Since the Proposition holds for $U$ and the generator
$Q|_U$, we have $E|_U \in D^-_\QCoh(\mathcal{O}_U)$. But then since
the functor $R (U \to X)_*$ preserves $D^-_\QCoh$
(by Lemma \ref{lemma-quasi-coherence-direct-image}), we get
$\tau_{\geq a}E \in D^-_\QCoh(\mathcal{O}_X)$. Thus
$E \in D^-_\QCoh (\mathcal{O}_X)$.
\end{proof}

\begin{proposition}
\label{proposition-detecting-bounded-below}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$.
Let $G \in D_{perf}(\mathcal{O}_X)$ be a perfect complex which generates
$D_\QCoh (\mathcal{O}_X)$. Let $E \in D_\QCoh (\mathcal{O}_X)$.
The following are equivalent
\begin{enumerate}
\item $E \in D^+_\QCoh (\mathcal{O}_X)$,
\item $\Hom_{D(\mathcal{O}_X)}(G[-i], E) = 0$ for $i \ll 0$,
\item $\Ext^i_X(G, E) = 0$ for $i \ll 0$,
\item $R\Hom_X(G, E)$ is in $D^+(\mathbf{Z})$,
\item $H^i(X, G^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} E) = 0$
for $i \ll 0$,
\item $R\Gamma(X, G^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} E)$
is in $D^+(\mathbf{Z})$,
\item for every perfect object $P$ of $D(\mathcal{O}_X)$
\begin{enumerate}
\item the assertions (2), (3), (4) hold with $G$ replaced by $P$, and
\item $H^i(X, P \otimes_{\mathcal{O}_X}^\mathbf{L} E) = 0$ for $i \ll 0$,
\item $R\Gamma(X, P \otimes_{\mathcal{O}_X}^\mathbf{L} E)$
is in $D^+(\mathbf{Z})$.
\end{enumerate}
\end{enumerate}
\end{proposition}

\begin{proof}
Assume (1). Since
$\Hom_{D(\mathcal{O}_X)}(G[-i], E) = \Hom_{D(\mathcal{O}_X)}(G, E[i])$
we see that this is zero for $i \ll 0$ by
Lemma \ref{lemma-ext-from-perfect-into-bounded-QCoh}. This proves
that (1) implies (2).

\medskip\noindent
Parts (2), (3), (4) are equivalent by the discussion in
Cohomology on Sites, Section \ref{sites-cohomology-section-global-RHom}.
Part (5) and (6) are equivalent as $H^i(X, -) = H^i(R\Gamma(X, -))$
by definition. The equivalent conditions (2), (3), (4) are
equivalent to the equivalent conditions (5), (6) by
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}
and the fact that $(G[-i])^\vee = G^\vee[i]$.

\medskip\noindent
It is clear that (7) implies (2). Conversely,
let us prove that the equivalent conditions (2) -- (6) imply (7).
Recall that $G$ is a  classical generator for $D_{perf}(\mathcal{O}_X)$ by
Remark \ref{remark-classical-generator}.
For $P \in D_{perf}(\mathcal{O}_X)$ let $T(P)$ be the assertion that
$R\Hom_X(P, E)$ is in $D^+(\mathbf{Z})$.
Clearly, $T$ is inherited by direct sums,
satisfies the 2-out-of-three property for distinguished
triangles, is inherited by direct summands, and is perserved by shifts.
Hence by Derived Categories, Remark \ref{derived-remark-check-on-generator}
we see that (4) implies $T$ holds on all of $D_{perf}(\mathcal{O}_X)$.
The same argument works for all other properties, except that for property
(7)(b) and (7)(c) we also use that $P \mapsto P^\vee$ is a self
equivalence of $D_{perf}(\mathcal{O}_X)$. Small detail omitted.

\medskip\noindent
We will prove the equivalent conditions (2) -- (7) imply (1)
using the induction principle of
Lemma \ref{lemma-induction-principle}.

\medskip\noindent
First, we prove (2) -- (7) $\Rightarrow$ (1) if $X$ is affine.
This follows from the case of schemes, see
Derived Categories of Schemes, Proposition
\ref{perfect-proposition-detecting-bounded-below}.

\medskip\noindent
Now assume $(U \subset X, j : V \to X)$ is an elementary distinguished
square of quasi-compact and quasi-separated algebraic spaces over $S$
and assume the implication (2) -- (7) $\Rightarrow$ (1)
is known for $U$, $V$, and $U \times_X V$. To finish the proof
we have to show the implication (2) -- (7) $\Rightarrow$ (1) for $X$.
Suppose $E \in D_\QCoh(\mathcal{O}_X)$ satisfies (2) -- (7).
By Lemma \ref{lemma-direct-summand-of-a-restriction} and
Theorem \ref{theorem-bondal-van-den-Bergh} there exists a perfect
complex $Q$ on $X$ such that $Q|_U$ generates $D_\QCoh (\mathcal{O}_U)$.

\medskip\noindent
Say $V = \Spec(A)$. Let $Z \subset V$ be the reduced closed subscheme
which is the inverse image of $X \setminus U$ and maps isomorphically to it
(see Definition \ref{definition-elementary-distinguished-square}).
This is a retrocompact closed subset of $V$.
Choose $f_1, \ldots, f_r \in A$ such that
$Z = V(f_1, \ldots, f_r)$. Let $K \in D(\mathcal{O}_V)$ be the perfect
object corresponding to the Koszul complex on $f_1, \ldots, f_r$ over $A$.
Note that since $K$ is supported on $Z$, the pushforward
$K' = Rj_*K$ is a perfect object of $D(\mathcal{O}_X)$ whose
restriction to $V$ is $K$ (see Lemmas \ref{lemma-pushforward-perfect}
and \ref{lemma-pushforward-with-support-in-open}).
By assumption, we know $R\Hom_{\mathcal{O}_X}(Q, E)$ and
$R\Hom_{\mathcal{O}_X}(K', E)$ are bounded below.

\medskip\noindent
By Lemma \ref{lemma-pushforward-with-support-in-open}
we have $K' =  j_!K$ and hence
$$
\Hom_{D(\mathcal{O}_X)}(K'[-i], E) = \Hom_{D(\mathcal{O}_V)}(K[-i], E|_V) = 0
$$
for $i \ll 0$. Therefore, we may apply
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-orthogonal-koszul-second-variant} to $E|_V$ to
obtain an integer $a$ such that
$\tau_{\leq a}(E|_V) =
\tau_{\leq a} R (U \times_X V \to V)_* (E|_{U \times_X V})$.
Then $\tau_{\leq a} E = \tau_{\leq a} R (U \to X)_* (E |_U)$
(check that the canonical map is an isomorphism after restricting to
$U$ and to $V$). Hence using Lemma \ref{lemma-bounded-below-truncation}
twice we see that
$$
\Hom_{D(\mathcal{O}_U)}(Q|_U [-i], E|_U) =
\Hom_{D(\mathcal{O}_X)}(Q[-i], R (U \to X)_* (E|_U)) = 0
$$
for $i \ll 0$. Since the Proposition holds for $U$ and the generator
$Q|_U$, we have $E|_U \in D^+_\QCoh(\mathcal{O}_U)$. But then since
the functor $R (U \to X)_*$ preserves $D^+_\QCoh$
(by Lemma \ref{lemma-quasi-coherence-direct-image}), we get
$\tau_{\leq a}E \in D^+_\QCoh(\mathcal{O}_X)$. Thus
$E \in D^+_\QCoh (\mathcal{O}_X)$.
\end{proof}










\section{Quasi-coherent objects in the derived category}
\label{section-QC}

\noindent
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Recall that $X_{affine, \etale}$ denotes the category of affine
objects of $X_\etale$ with topology given by standard \'etale coverings, see
Properties of Spaces, Definition
\ref{spaces-properties-definition-affine-etale-site}.
We remind the reader that the topos of $X_{affine, \etale}$
is the small \'etale topos of $X$, see Properties of Spaces, Lemma
\ref{spaces-properties-lemma-alternative}. The site $X_\etale$
comes with a structure sheaf $\mathcal{O}_X$ whose restriction
to $X_{affine, \etale}$ we also denote $\mathcal{O}_X$. Then there is an
equivalence of ringed topoi
$$
(\Sh(X_{affine, \etale}), \mathcal{O}_X)
\longrightarrow
(\Sh(X_\etale), \mathcal{O}_X)
$$
See Descent on Spaces, Equation
(\ref{spaces-descent-equation-alternative-small-ringed})
and the discussion in
Descent on Spaces, Section
\ref{spaces-descent-section-alternative-quasi-coherent}.

\medskip\noindent
In this section we denote $X_{affine}$ the underlying category of
$X_{affine, \etale}$ endowed with the chaotic topology, i.e., such that sheaves
agree with presheaves. In particular, the structure sheaf $\mathcal{O}_X$
becomes a sheaf on $X_{affine}$ as well.
We obtain a morphisms of ringed sites
$$
\epsilon :
(X_{affine, \etale}, \mathcal{O}_X)
\longrightarrow
(X_{affine}, \mathcal{O}_X)
$$
as in Cohomology on Sites, Section \ref{sites-cohomology-section-compare}.
In this section we will identify $D_\QCoh(\mathcal{O}_X)$ with
the category $\mathit{QC}(X_{affine}, \mathcal{O}_X)$ introduced in
Cohomology on Sites, Section \ref{sites-cohomology-section-modules-cohomology}.

\begin{lemma}
\label{lemma-DQCoh-alternative-small}
In the sitation above there are canonical exact equivalences between
the following triangulated categories
\begin{enumerate}
\item $D_\QCoh(\mathcal{O}_X)$,
\item $D_\QCoh(X_{affine, \etale}, \mathcal{O}_X)$,
\item $D_\QCoh(X_{affine}, \mathcal{O}_X)$, and
\item $\mathit{QC}(X_{affine}, \mathcal{O}_X)$.
\end{enumerate}
\end{lemma}

\begin{proof}
If $U \to V \to X$ are \'etale morphisms with $U$ and $V$ affine,
then the ring map $\mathcal{O}_X(V) \to \mathcal{O}_X(U)$ is flat. Hence
the equivalence between (3) and (4) is a special case of
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-cartesian-flat-quasi-coherent}
(the proof also clarifies the statement).

\medskip\noindent
The discussion preceding the lemma shows that we have an equivalence of
ringed topoi
$(\Sh(X_{affine, \etale}), \mathcal{O}_X) \to (\Sh(X_\etale), \mathcal{O}_X)$
and hence an equivalence between abelian categories of modules.
Since the notion of quasi-coherent modules is intrinsic
(Modules on Sites, Lemma \ref{sites-modules-lemma-special-locally-free})
we see that this equivalence preserves the subcategories
of quasi-coherent modules. Thus  we get a canonical exact equivalence
between the triangulated categories in (1) and (2).

\medskip\noindent
To get an exact equivalence between the triangulated categories
in (2) and (3) we will apply Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-compare-topologies-derived-adequate-modules}
to the morphism $\epsilon : (X_{affine, \etale}, \mathcal{O}_X) \to
(X_{affine}, \mathcal{O}_X)$ above. We take
$\mathcal{B} = \Ob(X_{affine})$ and we take
$\mathcal{A} \subset \textit{PMod}(X_{affine}, \mathcal{O})$
to be the full subcategory of those presheaves $\mathcal{F}$
such that $\mathcal{F}(V) \otimes_{\mathcal{O}_X(V)} \mathcal{O}_X(U)
\to \mathcal{F}(U)$ is an isomorphism. Observe that by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-quasi-coherent-alternative-small}
objects of $\mathcal{A}$ are exactly those sheaves in the \'etale
topology which are quasi-coherent modules on
$(X_{affine, \etale}, \mathcal{O}_X)$.
On the other hand, by Modules on Sites, Lemma
\ref{sites-modules-lemma-chaotic-quasi-coherent},
the objects of $\mathcal{A}$ are exactly the quasi-coherent modules
on $(X_{affine}, \mathcal{O}_X)$, i.e., in the chaotic topology.
Thus if we show that Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-compare-topologies-derived-adequate-modules}
applies, then we do indeed get the canonical equivalence between the
categories of (2) and (3) using $\epsilon^*$ and $R\epsilon_*$.

\medskip\noindent
We have to verify 4 conditions:
\begin{enumerate}
\item Every object of $\mathcal{A}$ is a sheaf for the \'etale topology.
This we have seen above.
\item $\mathcal{A}$ is a weak Serre subcategory of
$\textit{Mod}(X_{affine, \etale}, \mathcal{O}_X)$. Above we have
seen that $\mathcal{A} = \QCoh(X_{affine, \etale}, \mathcal{O}_X)$ and
we have seen above that these,
via the equivalence $\textit{Mod}(X_{affine, \etale}, \mathcal{O}) =
\textit{Mod}(X_\etale, \mathcal{O}_X)$, correspond to the quasi-coherent
modules on $X$. Thus the result by Properties of Spaces, Lemma
\ref{spaces-properties-lemma-properties-quasi-coherent} and
Homology, Lemma \ref{homology-lemma-characterize-weak-serre-subcategory}.
\item Every object of $X_{affine}$ has a covering in the chaotic
topology whose members are elements of $\mathcal{B}$. This holds
because $\mathcal{B}$ contains all objects.
\item For every object $U$ of $X_{affine}$ and $\mathcal{F}$ in $\mathcal{A}$
we have $H^p_{Zar}(U, \mathcal{F}) = 0$ for $p > 0$.
This holds by the vanishing of cohomology of quasi-coherent modules
on affines, see discussion in Cohomology of Spaces, Section
\ref{spaces-cohomology-section-higher-direct-image} and
Cohomology of Schemes, Lemma
\ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}.
\end{enumerate}
This finishes the proof.
\end{proof}

\begin{remark}
\label{remark-QC-compare}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
We will later show that also
$\mathit{QC}((\textit{Aff}/X), \mathcal{O})$
is canonically equivalent to $D_\QCoh(\mathcal{O}_X)$.
See Sheaves on Stacks, Proposition \ref{stacks-sheaves-proposition-QC-compare}.
\end{remark}






\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}

